Use LOOKUP and LOOKDOWN Command instead of IF THEN Statements
Hi EveryOne
I want to learn more about using diffrent commands any
s
I have a project that·I have put on hold for awhile because· of·not know how to do away so many IF THEN Statements
This what i want to do is this
Hours of·Sun Light
···············IF hrs = $10 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·8 hrs and·00 mins
···············IF hrs = $10 AND mins = $30 THEN· =· Leave Out side light·ON hours for·7 hrs·and 30 mins··
···············IF hrs = $11 AND mins = $00 THEN· =· Leave Out side light·ON hours for·7· hrs·and·00 mins
Can some one·give me an example of how to do this with the three above
···············IF hrs = $11 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·6··hrs·and·30 mins
···············IF hrs = $12 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·6· hrs·and·00 mins····
···············IF hrs = $12 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·5· hrs·and·30 mins
·············· IF hrs = $13 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·5· hrs·and·00 mins
·············· IF hrs = $13 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·4· hrs·and·30 mins
·············· IF hrs = $14 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·4· hrs·and·00 mins
·
I would like to learn how to do away with all of the IF THEN Statement
This is what i did was use the Select and case command but can only do the hrs or mins but not both
SELECT hrs
·CASE $10
·GOTO Timer1
·CASE $11
·GOTO Timer2
·CASE $12
·GOTO Timer3
·CASE $13
·GOTO Timer4
·CASE $14
·GOTO Timer5
·ENDSELECT
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 8/9/2007 3:23:23 AM GMT
I want to learn more about using diffrent commands any

I have a project that·I have put on hold for awhile because· of·not know how to do away so many IF THEN Statements
This what i want to do is this
Hours of·Sun Light
···············IF hrs = $10 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·8 hrs and·00 mins
···············IF hrs = $10 AND mins = $30 THEN· =· Leave Out side light·ON hours for·7 hrs·and 30 mins··
···············IF hrs = $11 AND mins = $00 THEN· =· Leave Out side light·ON hours for·7· hrs·and·00 mins
Can some one·give me an example of how to do this with the three above
···············IF hrs = $11 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·6··hrs·and·30 mins
···············IF hrs = $12 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·6· hrs·and·00 mins····
···············IF hrs = $12 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·5· hrs·and·30 mins
·············· IF hrs = $13 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·5· hrs·and·00 mins
·············· IF hrs = $13 AND mins = $30 THEN· =· Leave Out side light·ON hours·for·4· hrs·and·30 mins
·············· IF hrs = $14 AND mins = $00 THEN· =· Leave Out side light·ON hours·for·4· hrs·and·00 mins
·
I would like to learn how to do away with all of the IF THEN Statement
This is what i did was use the Select and case command but can only do the hrs or mins but not both
SELECT hrs
·CASE $10
·GOTO Timer1
·CASE $11
·GOTO Timer2
·CASE $12
·GOTO Timer3
·CASE $13
·GOTO Timer4
·CASE $14
·GOTO Timer5
·ENDSELECT
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·

·
·
·
·
Sam
Post Edited (sam_sam_sam) : 8/9/2007 3:23:23 AM GMT
Comments
I don't mean to brag, but this isn't all that hard to learn,(I did·it tonight)·especially with the help file (check out the example code).· I think this covers all of it.· Feel free to ask questions, but look at the help file first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Thank You For your help with this
This an example that i can understand
I did look at the· on line help first·but i did not understand the example that where given
It would be easier if you combined hrs and minutes into one variable.· That said here is what I would do:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 8/9/2007 1:56:48 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pin U will get
you will get pin ned
infinitys endless journeys 888888888888888888 sideways
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please explane this more for me
I would make the variable in tenths of an hr, so $10 and $30 = $105.
[noparse][[/noparse]How dose this· =·($105) ] = 10 and $30
·
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔