[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Looking for code samples using goto and labels
- From: marbux <marbux@...>
- Date: Sun, 24 Feb 2013 03:16:46 -0800
By far my most common use of goto is to conditionally repeat a chunk,
usually when error checking the return of dialog APIs, instead of
using repeat ... until; e.g.,
::name::
strName = Nc_GUI_InputDlg("Enter Your Name", "", "", 0, 0)
if strName == "" then
Nc_GUI_InfoBox("Entry of at least one character in the name field is
mandatory.", 1)
goto name
end
Best regards,
Paul