Fixed Length Strings

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators: Administrator, Global Moderator

Post Reply
Guest

Fixed Length Strings

Post 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 ...
User avatar
frankiebaby
Global Moderator
Posts: 95
Joined: Tue Apr 30, 2002 1:38 am
Location: Pennsylvania
Contact:

Re: Fixed Length Strings

Post 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.
Guest

Re: Fixed Length Strings

Post by Guest »

Thanks!
Worked like a charm!
Post Reply