September 21, 2020, 03:39:19 am

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Istring in function: how?

Started by JoaoAfonso, September 24, 2007, 05:41:04 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JoaoAfonso

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
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

Ionic Wind Support Team

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:

Code Select

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

Ionic Wind Support Team

JoaoAfonso

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...
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

JoaoAfonso

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
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900