CompuServe Messages

String surprise

    17-Jul-85 01:30:17
Sb: #85677-String surprise
Fm: Tim Peters 72227,2416
To: Sysop Dave Thomas 76703,446
Ain't nuthin', Dave: there's an OPEN statement that'll cause a coldstart! ( Not to worry – you won't do it by accident, & I'm not telling!) Lemme explain the string thing a little, since it IS obscure: It's a bug (of course). But unlikely you'll hit it innocently – you need a MID$ on the LHS ("left-hand side"), and the SAME variable on the RHS, all by itself (anything else on the RHS & it'll work: eg, '…=X$+""' works, as does '…=MID$(X$,1)', etc.). So, not as bad as it looks. There's a positive side, too: the WAY it fails implies that stmnts of the FORM 'MID$(X1$,…)=X2$' don't create ANY string garbage; programs that spend lots of time in BASIC's garbage collector can be sped up enormously by rewriting stmnts IN that form (if possible). Moral?: since Tandy won't fix their bugs, it's up to us to turn them into FEATURES! Sigh,… (by the by, your outrageous alliterations always bring a smile – thanks!) – tim Enter command, N for next message or <ENTER> for menu:n