Newbie question - how to check for a varible

Bernard Devlin bdrunrev at gmail.com
Sun May 10 05:17:35 EDT 2009


The message box is an amazing feature.  You can use it in a debugging
session to work with the state of your code at the breakpoint.

Bernard

On Fri, May 8, 2009 at 7:43 AM, Stephen Cox <stephen at networkxfla.com> wrote:
> Lol. Of course. I knew it would be easy. Thanks.
>
> For the life of me I could not find an example in the docs; the user guild
> or online.
>
> The messagebox? I hardly use it. Gets in the way mostly. I've been using it
> to look at global variables. I know you can run commands. But if you don't
> know the commands, it's no help. Or am I wrong about this?
>
>
> On 5/8/09 2:35 AM, "Joe Lewis Wilkins" <pepetoo at cox.net> wrote:
>
>> Stephen,
>>
>> Without even checking, since it's the way it would be done in HC, just
>> use:
>>
>> if tUsername is empty then ....
>>
>> if tUsername exists then ...
>>
>> You were already there. Didn't you check these out in the messagebox?
>>
>> Joe Wilkins
>>
>> On May 7, 2009, at 11:25 PM, Stephen Cox wrote:
>>
>>> Really two questions:
>>>
>>> How do I check if a variable is empty? Sort of like;
>>>
>>> If !empty(tUsername)
>>>    // process here
>>> Endif
>>>
>>> Empty() is a Foxpro function that pops if what you are checking is
>>> empty. I
>>> can¹t seem to find it¹s equivalent in revolution. Am I approaching
>>> this the
>>> wrong way? And can I check fields the same way?
>>>
>>> I suppose I could create an empty variable and just compare the 2?
>>> But is
>>> there an easier way?
>>>
>>> Next question; checking the existence of a variable? Now I know I
>>> can turn
>>> on Strict Compilation (and I have) but I¹d rather have the assurance
>>> of
>>> checking to see if a variable exist? Is this a non-issue in
>>> Revolution?
>>>
>>> Thanks
>>>
>>> -Stephen Cox
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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