Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dumb little question

Status
Not open for further replies.

qbasicking

Programmer
Aug 19, 2001
628
US
The default for the length of a string DIM strng$ is 128 bytes, I knew how to customize that, but I forgot how to and I can't find anything about it in any of my books.
I know how to use TYPE, but I want to use DIM, how do I do that?
 
replace:
DIM strng$
with
DIM strng as STRING * X
where X is number of bytes...
ex...
DIM strng as STRING * 5
strng = "hello"

(it has been a while since I used it... if that doesnt work... try STRING(X) but I am pretty sure it is STRING * X) Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
thank you
I knew it was some dumb little thing I was using
DIM strng$ AS STRING * 20

oops :)
 
does it really default to 128...
I could have sworn it was 256...
I could be wrong though. Sometimes... the BASIC things in life are the best...
cheers.gif

or at least the most fun ;-)
-Josh Stribling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top