switch

John Tregea john at debraneys.com
Sat Mar 18 22:39:22 EST 2006


Hi,

Just a question regarding the form many of you use for naming variables. 
I see a lot of variable names starting with 't' and wondered what it 
indicates. I use 'g' as a prefix for my global variables but that is all.

John (Ready to say "Duh"...) T

Klaus Major wrote:
> Hi Liam,
>
>> what am I doing wrong here
>>
>> put fld "total" into ttotal
>>   put fld "paymenttype" into tpayment
>> ##!!  switch "tpayment"
> ## No quotes, since this is a variable!
>>   case "credit"
>>  ## if tpayment contains "credit" then put ttotal into fld "CreditDb"
> ## If tpayment = "credit" then it also contains "credit"! :-)
>> ##exit switch
> BREAK
>> case "cash"
>> ##if tpayment contains "cash" then put ttotal into fld "cash2"
> ## See above
>> ##exit switch
> break
>> end switch
>
> this should work:
> ...
>   put fld "total" into ttotal
>   put fld "paymenttype" into tpayment
>   switch tpayment
>   case "credit"
>     put ttotal into fld "CreditDb"
>     break
>   case "cash"
>     put ttotal into fld "cash2"
>     break
>   end switch
> ...
>
> Hope that helps.
>
>> Liam Lambert
>> liamlambert at mac.com
>> IRELAND
>
> Regards
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list