TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

null $result

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Sun Jul 16, 2006 3:00 pm    Post subject: null $result Reply with quote

Code:
#ECHO %0

Quote:
#FORMAT: $result IS NOW SET TO {}

Kind of odd.

Code:
#ECHO {};#VARIABLE {result}

Quote:
#SYNTAX: #format {variable} {format} {arguments}
<#echo: error>
#VARIABLE {result}={<#echo: error>}


Inconsistent it seems.

You can also use an empty function like:
Code:
#FUNCTION blank { }

will return whatever is in $result rather than nothing. Perhaps $result should be cleared of it's value once it's no longer needed.

Code:
#ECHO %0

from the command line will always reset $result to null.

I think actually implementing null variables may be useful. It seems to act inconsistently odd right now.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Jul 18, 2006 7:34 am    Post subject: Re: null $result Reply with quote

louipc wrote:
Code:
#ECHO %0

Quote:
#FORMAT: $result IS NOW SET TO {}

Kind of odd.

Try %%0 instead to escape the formatting routine. I guess I should document it somewhere.

Quote:

Code:
#ECHO {};#VARIABLE {result}

Quote:
#SYNTAX: #format {variable} {format} {arguments}
<#echo: error>
#VARIABLE {result}={<#echo: error>}


Inconsistent it seems.

It's a bit of a lousy way to report back errors I guess.

Quote:

You can also use an empty function like:
Code:
#FUNCTION blank { }

will return whatever is in $result rather than nothing. Perhaps $result should be cleared of it's value once it's no longer needed.

Dunno, what if someone wants the last value of $result to be re-used?

Regardless, it's the user's job to make sure $result is set.

Quote:

Code:
#ECHO %0

from the command line will always reset $result to null.

I think actually implementing null variables may be useful. It seems to act inconsistently odd right now.

[/quote]
You can generally set a variable to an empty string using: #format variable %s
Back to top
View user's profile Send private message Send e-mail
louipc



Joined: 16 Jul 2006
Posts: 65

PostPosted: Tue Jul 18, 2006 5:01 pm    Post subject: Reply with quote

Ah alright. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group