V4REV - LiveCode have try-catch already ?? Wow? :-)
Bernard Devlin
bdrunrev at gmail.com
Sat Dec 17 03:44:30 CST 2011
Well, as far as I remember, LiveCode has had Try/Catch/Finally since
it was Revolution 1.1.1 (which is about 10 years ago) :) But it
seems to me that not many people use this feature. Errors still get
thrown and get caught by the engine (interpreter) at the final point,
and displayed in an error dialogue. But I find it a convenient
structuring technique so I use try/catch a lot.
In fact, Livecode also has "throw"
http://docs.runrev.com/Control-Structure/throw
open file tFile for text read
if the result is not empty then
throw "failed_to_open_file"
end if
But the real beauty of Livecode for me is that it is an exceedingly
late-binding language. Entire interfaces can be built dynamically,
and functions/procedures can be built on the fly and applied.
Bernard
On Sat, Dec 17, 2011 at 9:03 AM, Ruslan Zasukhin
<ruslan_zasukhin at valentina-db.com> wrote:
> On 12/15/11 5:44 PM, "Bernard Devlin" <bdrunrev at gmail.com> wrote:
>
>> try
>> put VField_Name( fldRef) into tFieldName
>> put VField_Type(fldRef ) into tFieldType
>> switch
>> case tFieldtype contains "blob"
>> put VBLOB_ReadRawData( fldRef ) into tFieldValue
>> break
>> default
>> put VField_Value( fldRef ) into fldValue
>> break
>> end switch
>> catch tErr
>> breakpoint
>> end try
>
>
> I have note try catch block.
>
>
> We have exceptions in LiveCode ?
>
> From which version if anybody know?
>
> Well, then we can try improve V4REV to support exceptions,
> And we will have switch between
> LastError code style
> exception style
>
>
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list