Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    f-script syntax for case-like statement?
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Journeyman
Posted
Hello-

I'm curious as how to handle 'case/switch-like statements in f-script, as it seems the only conditional is one boolean- I'd like to be able to do something like:

(mock code)

x := value_of_duration_seconds

case
(x <= 86400)
days := 1.
(x > 86400 & x < 172800)
days := 2.
(x > 172800 & x < 345600)
days := 3.
...
end case

or even if / else if/ else if end..

But I'm not sure how to do this within the if true/ if false - unless I just have to have a separate if true if false block for each?

Thanks!
-E
 
Posts: 96 | Location: San Francisco | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
Veteran
Picture of adam
Posted Hide Post
Hi Eric

You are essentially correct in your guess of what you would need to do. Page 18 of the F-script guide http://www.fscript.org/documentation/FScriptGuide.pdf demonstrates the structure you're looking for.

hth,


adam
 
Posts: 643 | Location: san francisco bay area | Registered: June 09, 2006Reply With QuoteEdit or Delete MessageReport This Post
Journeyman
Posted Hide Post
Thanks Adam. It's kind of kludgy but I'll make do...
 
Posts: 96 | Location: San Francisco | Registered: June 22, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

Marketcircle    Forums  Hop To Forum Categories  Extending Daylite  Hop To Forums  Scripting    f-script syntax for case-like statement?

© Copyright 2006 Marketcircle Inc. All rights reserved.