IonicWind Software

IWBasic => General Questions => Topic started by: J B Wood (Zumwalt) on December 26, 2006, 08:24:18 PM

Title: ElseIf
Post by: J B Wood (Zumwalt) on December 26, 2006, 08:24:18 PM
Forgive my lack of looking, but I can't seem to find the ElseIf clause.
Do I have to do that long hand for the time being?
Title: Re: ElseIf
Post by: Ionic Wind Support Team on December 26, 2006, 08:36:51 PM
Because there isn't one ;)
Title: Re: ElseIf
Post by: J B Wood (Zumwalt) on December 26, 2006, 08:48:04 PM
Ok, final question on that, what about string continuation using the _ at the end of a line

STRING test="this is the first" _
"part of a very long" _
"string"

Title: Re: ElseIf
Post by: Ionic Wind Support Team on December 26, 2006, 08:53:50 PM
STRING test="this is the first" +_
"part of a very long" +_
"string"

Each 'part' of a string is limited to 1024 characters.
Title: Re: ElseIf
Post by: J B Wood (Zumwalt) on December 26, 2006, 08:55:04 PM
Thanks, forgot about the limitation.
What about subs?

Sub mytest (def myval as int, _
                  def myval1 as int, _
                  def myval2 as int), int

Title: Re: ElseIf
Post by: Ionic Wind Support Team on December 26, 2006, 09:08:51 PM
subs and their parameters have to be on one line.  The preparser can't handle the _ symbol.   

Declare's can use the _ though.

Paul.
Title: Re: ElseIf
Post by: J B Wood (Zumwalt) on December 26, 2006, 09:10:22 PM
Yikes.. ok, thanks..
What about conditional statements?


If m_Level(X, Y, Z).sFloorType = SquareType.sFloor _
           And sType <> SquareType.Door _
           And sType <> SquareType.StairsDn _
           And sType <> SquareType.StairsUp _
        Then
            return
        End If
Title: Re: ElseIf
Post by: Ionic Wind Support Team on December 26, 2006, 09:21:05 PM
You tell me.  I have done that before and it has worked, but if you are having problems it is better to state so then to try and make me guess  ::) 

Then THEN is really not necessay and I would probably code it as:

If (m_Level(X, Y, Z).sFloorType = SquareType.sFloor) _
           And (sType <> SquareType.Door) _
           And (sType <> SquareType.StairsDn) _
           And (sType <> SquareType.StairsUp)
                 return
End If

Title: Re: ElseIf
Post by: J B Wood (Zumwalt) on December 26, 2006, 09:26:42 PM
Thanks again for your patience with me Paul.
I'll work on this some more tomorrow, over 2500 lines as it is, just had those small sticking points.