Page 1 of 1

Fixed Length Strings

Posted: Thu Jul 17, 2003 10:55 pm
by Guest
HELP!
I need Dimensioned Fixed-Length Strings!!
Anyone know if/how this can be done??
ie: NAME$(50) needs to be only 25 Chars long instead if 32767 ...

Re: Fixed Length Strings

Posted: Fri Jul 18, 2003 2:20 am
by frankiebaby
I beleive that

DIM NAME (50) AS STRING * 25

should do the trick, but you lose the convenience of the string identifier, so NAMESTR may be a better name, mainly because NAME is a reserved word.

Re: Fixed Length Strings

Posted: Sat Jul 19, 2003 4:07 am
by Guest
Thanks!
Worked like a charm!