Page 1 of 1 1
Topic Options
#173847 - 2007-02-12 04:55 PM One Line Code
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
I can't seem to find the answer to this anywhere.
Does anyone know of you can perform multiple tasks in a 1-line if statement.
To clarify:
 Code:
If 1 = 1 ? "success" Else ? "Failure" EndIf

Works as a one line statement but what you you want to perform more if the statement is true for instance have another ? "success" in it ?
 Code:
If 1 = 1 ? "success" ? "success2" Else ? "Failure" EndIf


Any help would be appreciated.

Top
#173850 - 2007-02-12 05:17 PM Re: One Line Code [Re: Arend_]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
As far as I know, you can shrink an entire script into one line - no matter how many statements you have. Not sure I follow your question.
Top
#173851 - 2007-02-12 05:19 PM Re: One Line Code [Re: Arend_]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Works great.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#173869 - 2007-02-13 08:39 AM Re: One Line Code [Re: Shawn]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
LOL, I tried every single character as a split token between commands like:
? "success1" | ? "success2"

In the example I did the thing I didn't try \:\) no split token \:\)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1328 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.183 seconds in which 0.141 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org