return "error" code from standalone compile
John Balgenorth
sundown.pacifier at icloud.com
Thu Dec 10 07:02:44 EST 2020
Since Livecode is written in C++ here is some
info about using return in C.
Every C program has a function named main. At the
end of the function the programmer usually writes a
return 0;
That tells the c program the code has completed
and is exiting with a 0 value which confirms it has
successfully executed the code and is quitting.
At any point above that line the programmer can write
a return call but they will usually use a 1 on another
value. The program will exit the code at that point and
it does not matter what value is entered after the return
but 1 usually means the code failed and any other value
but 0 means anything you want it to mean.
JB
> On Dec 9, 2020, at 8:52 PM, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I don't know much about this but it looks interesting. Is there a list of exit codes somewhere? When the OS receives the exit code, what happens? I.e., how would I use it?
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>>> On 12/9/20 5:32 PM, Douglas A. Ruisaard via use-livecode wrote:
>>> On the completion of a stack, can the compiled executable return an error
>>> code like the old DOS ErrorLevel value(s)? If so, how do you specify the
>>> error code? in the on closeStack call?
>>
>> See the quit command in the dictionary.
>>
>> quit 42
>>
>> --
>> Mark Wieder
>> ahsoftware at gmail.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list