Author Topic: Returning multiple values in a while statement  (Read 1642 times)

Before I proceed what I am doing is it possible to return multiple values? for example:
      while(!%inFileHandle.IsEOF())
      {
         %inLine = %inFileHandle.readLine() ;
         
                   // output read text to console.
         return %inLine;
      }


Would that return all of the lines read by %inFileHande.readLine or just return one and stop?

while (!%fp.isEOF())
  %content = %content @ %fp.readLine() @ "\n";

%fp.close();
%fp.delete();

return %content;

I'd be careful with that though, remember that there is a string length limit.
« Last Edit: April 08, 2014, 09:05:36 AM by boodals 2 »

I'd be careful with that though, remember that there is a string length limit.
There isn't?

There is a limit for commandtoserver/client, but no length limit for strings.

I'd be careful with that though, remember that there is a string length limit.

The only limits are:

* Console output (echo): 4096 bytes
* Client/server commands (commandTo...): 256 bytes
* Variable dumping (export): 40,960 bytes

Oh, okay then. That explains why I've never had any difficulties with it.

There isn't?

There is a limit for commandtoserver/client, but no length limit for strings.
for(%a = 0; %a < 100000; %a++) %string = %string @ "00000000000000000000000000000 000";

I'm pretty sure that will crash you

for(%a = 0; %a < 100000; %a++) %string = %string @ "00000000000000000000000000000 000";

I'm pretty sure that will crash you
didn't crash just took like a full 10-20 minutes

didn't crash just took like a full 10-20 minutes

its like that terrible habbit people have when they click over and over when a program goes unresponsive.
click
click