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
|