IonicWind Software

Creative Basic => General Questions => Topic started by: JoaoAfonso on September 24, 2007, 05:41:04 PM

Title: Istring in function: how?
Post by: JoaoAfonso on September 24, 2007, 05:41:04 PM
Hail
This is an old problem I have almost sure I've read before in IB foruns: I need to use a function with one of the components being a istring (for text strings bigger than 255 characters). The problem is that gives mistake if I define the function with istring, and if just string, it is always truncated at 255 chars...
I have almost sure I could use, inside the funcion, the string as istring, but it is not working. Any hint, please?

Thank you in advance
Title: Re: Istring in function: how?
Post by: Ionic Wind Support Team on September 24, 2007, 05:52:32 PM
An ISTRING is just for the definiton.  You still declare the function as taking a STRING type, since they are passed by reference.  Run this in your Creative IDE:


declare mysub(s as string)

def gs[1000] as istring
gs = string$(999,"X")
mysub(gs)

do:until inkey$<> ""
end

sub mysub(s as string)
print s
return

Title: Re: Istring in function: how?
Post by: JoaoAfonso on September 24, 2007, 05:56:10 PM
Thanks for the FAST answer :P

I believe I knew it before, but I use this var

def temp[65000]:istring

in a function with strings, and still cuts my string at 255...
Title: Re: Istring in function: how?
Post by: JoaoAfonso on September 24, 2007, 06:01:21 PM
I am sorry, I am stupid. I was sending to the function "blablabla"+temp... thank you :) it took 3 minutes for you to answer :P