realbasic-nug
[Top] [All Lists]

Re: Can I, Pretty Please???

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Can I, Pretty Please???
From: john roberts <jarobe01 at athena dot louisville dot edu>
Date: Sat, 29 Jun 2002 01:28:43 -0400
on 6/29/02 12:44 AM, Jim Wagner at wagnerj at proaxis dot com wrote:

> In C, you can use the boolean result of a conditional expression to assign
> a boolean value. For example, if Flag is declared as a boolean, you can, if
> memory serves correctly (and it might not), write:
> 
> Flag = (Num > 10)
> 
> Granted, the syntax is a bit different, but can you, in RB, write:
> 
> Flag = (Num > 10)

Not only that but try the following:
1.  Create a new project
2.  Add an editField and in the keydown event put the following:

        dim flag as variant
        if key=chr(13) or key=chr(3) then
            flag = ( val(me.text) > 10 )
            msgBox flag
            return true
        end
3.  Run the project and enter some values; numeric and otherwise.

John



<Prev in Thread] Current Thread [Next in Thread>