Re: return "error" code from standalone compile

2020-12-12 Thread Mark Wieder via use-livecode

On 12/11/20 3:36 PM, Richard Gaskin via use-livecode wrote:

The bigger problem with these sorts of issues is how the public web site 
becomes so different from the ones we have installed.


Agreed. I think I wasn't even much aware that an online dictionary existed.

I was about to post that I don't see why updating the web version when 
there's a new release was a problem, but then I looked at the page 
source of the web dictionary. While the local dictionary that opens in a 
browser is clean easy-to-read-and-understand html, the web site is a mess.


It's 90% css and the other half is ad-tracking analytics.
Easy to see why it's not maintained.

Don't believe everything you read on the web.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread J. Landman Gay via use-livecode
I use the online dictionaries (LC's and Brian Milby's) when I'm reading the 
list or the forums, or any other time I'm curious about something, and I'm 
on my tablet, phone, or Chromebook. None of the online resources are 
perfect, though Brian's is the most up to date. Often I want to check 
syntax or copy an example when composing an answer.


I wish LC would always show complete info from the latest release. 
Sometimes I just want to know something. Like, say, error codes on quit.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com

Mark Wieder wrote:


Why are you looking at the web version of the documentation instead of
the local one?




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Richard Gaskin via use-livecode

Mark Wieder wrote:

> On 12/11/20 10:57 AM, Richard Gaskin via use-livecode wrote:
>
>>> @ Mark Weider: where did you learn about the quit command supporting
>>> an exit code?
>
> I just always assumed this was part of the canon.

Seems reasonable. Dr Raney was a Unix fan.


> I added a note to your bug report.

Thanks.


> Why are you looking at the web version of the documentation instead of
> the local one?

Habit. I use multiple devices of different types.  Not all of them have 
LC installed.



> ...and again... tinyDictionary does an even better job of putting this
> dictionary entry into perspective.

Thanks, but I'm pretty familiar with the docs options in our community. 
I even know our community manager pretty well. ;)


The bigger problem with these sorts of issues is how the public web site 
becomes so different from the ones we have installed.


I can hunt down good docs. The general public won't know to do that.

Moreover, limiting the public-facing Dict to Community-only obviates the 
upsell opportunity.


But beyond the missed opportunity, from time to time it's also just the 
wrong content.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Mark Wieder via use-livecode

On 12/11/20 12:56 PM, Mark Wieder via use-livecode wrote:

On 12/11/20 10:57 AM, Richard Gaskin via use-livecode wrote:

@ Mark Weider: where did you learn about the quit command supporting 
an exit code?


I just always assumed this was part of the canon.


The dictionary entry for "quit"


I added a note to your bug report.
Why are you looking at the web version of the documentation instead of 
the local one?


...and again... tinyDictionary does an even better job of putting this 
dictionary entry into perspective.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Mark Wieder via use-livecode

On 12/11/20 10:57 AM, Richard Gaskin via use-livecode wrote:

@ Mark Weider: where did you learn about the quit command supporting an 
exit code?


The dictionary entry for "quit"

Am I missing something here?

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Richard Gaskin via use-livecode

Ken Ray wrote:

> Mark Wieder wrote:
>> See the quit command in the dictionary.
>>
>> quit 42
>
>
> Wow... I've been using Livecode since its inception (and Revolution
> before that, and even MetaCard before *that*!), and I never knew this
> existed!

Me neither.

If this optional exit code param was documented earlier, it's not there now.


> (I wonder if anyone's put together a "list of things Livecode can do
> that you probably didn't know about" ?)

I considered it, but then it occurred to me that anything in the list 
would become public knowledge and thereby no longer qualify for 
inclusion in such a list. ;)


More seriously, I used to maintain a list in a document titled "mode 
16", but I can't find it right now so I can't recall how you stumbled 
across "mode 16" or the other notes there.  I'll find it sometime...



I just filed a bug report on this missing element:
https://quality.livecode.com/show_bug.cgi?id=23028


@ Mark Weider: where did you learn about the quit command supporting an 
exit code?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Bob Sneidar via use-livecode
Autohotkey is a windows only macro program. 

Bob S


> On Dec 11, 2020, at 07:01 , Ken Ray via use-livecode 
>  wrote:
> 
> Wow... I've been using Livecode since its inception (and Revolution before 
> that, and even MetaCard before *that*!), and I never knew this existed!
> 
> Just goes to show that there's always something new to learn about our 
> favorite development tool. 
> 
> (I wonder if anyone's put together a "list of things Livecode can do that you 
> probably didn't know about" ?)
> 
> :D
> 
> 
> Ken Ray
> Sons of Thunder Software, Inc.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-11 Thread Ken Ray via use-livecode
Wow... I've been using Livecode since its inception (and Revolution before 
that, and even MetaCard before *that*!), and I never knew this existed!

Just goes to show that there's always something new to learn about our favorite 
development tool. 

(I wonder if anyone's put together a "list of things Livecode can do that you 
probably didn't know about" ?)

:D


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com


> On Dec 10, 2020, at 11:51 AM, Douglas A. Ruisaard via use-livecode 
>  wrote:
> 
> I use AUTOHOTKEY... as a fast, dirty way to "get stuff done" when I'm either 
> too lazy or too rushed to do a "quality" job with Livecode.  It has a command 
> called "Run" & "Runwait" ... which returns the calling program's (Livecode 
> executable, in this case) return code into a predefined variable called 
> "ErrorLevel" (how original!).  So a line in a AUTOHOTKEY script for this 
> would look like:
> 
>   cmd = c:\livecode\SomeLiveCode.exe
>   RunWait, %cmd%,,UseErrorLevel
>   exitcode := ErrorLevel
>   if (exitcode > 1)
> 
> Autohotkey takes some getting used to but I think it's a handy addition to 
> development projects.. since AHK scripts can be compiled into executables, 
> themselves.
> 
> My 4.5 cents
> 
> Douglas Ruisaard
> 
>Trilogy Software
>  (250) 573-3935
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of John Balgenorth via use-livecode
> Sent: Thursday, December 10, 2020 4:03 AM
> To: How to use LiveCode
> Cc: John Balgenorth
> Subject: Re: return "error" code from standalone compile
> 
> 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 
>>  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 | jac...@hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>>> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
>>>  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
>>> ahsoftw...@gmail.com
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: return "error" code from standalone compile

2020-12-10 Thread Douglas A. Ruisaard via use-livecode
I use AUTOHOTKEY... as a fast, dirty way to "get stuff done" when I'm either 
too lazy or too rushed to do a "quality" job with Livecode.  It has a command 
called "Run" & "Runwait" ... which returns the calling program's (Livecode 
executable, in this case) return code into a predefined variable called 
"ErrorLevel" (how original!).  So a line in a AUTOHOTKEY script for this would 
look like:

cmd = c:\livecode\SomeLiveCode.exe
RunWait, %cmd%,,UseErrorLevel
exitcode := ErrorLevel
if (exitcode > 1)

Autohotkey takes some getting used to but I think it's a handy addition to 
development projects.. since AHK scripts can be compiled into executables, 
themselves.

My 4.5 cents

Douglas Ruisaard
   
Trilogy Software
  (250) 573-3935


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
John Balgenorth via use-livecode
Sent: Thursday, December 10, 2020 4:03 AM
To: How to use LiveCode
Cc: John Balgenorth
Subject: Re: return "error" code from standalone compile

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 
>  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 | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
>>  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
>> ahsoftw...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-10 Thread John Balgenorth via use-livecode
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 
>  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 | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
>>  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
>> ahsoftw...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-10 Thread matthias rebbe via use-livecode
Every application can have its own exit codes, but 0 should always be used for 
success and 1 for error.
Although there are exceptions. The Dos Find command for example returns 1 when 
the search was successfull but nothing was found.


You could use exit codes for example in batch files. The batch file runs a 
program and according to the exit code of that program the batch file executes 
the next command or application or what ever.

The OS is not interested in the exit codes. ;) But maybe the batch file or 
program that executed the other app. 
I am using this feature for example in some of my LC app where i execute a 3rd 
party command line tool using shell().  'The result' then contains  the exit 
code. Important: If the exit code is 0 then 'the result' is empty. 

Here are some links with some more information

Windows
http://www.chebucto.ns.ca/~ak621/DOS/ExitCode.html

Linux
https://shapeshed.com/unix-exit-codes/

macOS
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysexits.3.html



Regards,
Matthias

-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 10.12.2020 um 05:51 schrieb J. Landman Gay via use-livecode 
> :
> 
> 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 | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
>  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
>> ahsoftw...@gmail.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-09 Thread J. Landman Gay via use-livecode
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 | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
 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
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-09 Thread Mark Wieder via use-livecode

On 12/9/20 5:53 PM, Douglas A. Ruisaard wrote:

Beauties!   .. thanks! ... should have remembered that!


Cool. And where you put it depends on your application.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: return "error" code from standalone compile

2020-12-09 Thread Douglas A. Ruisaard via use-livecode
Beauties!   .. thanks! ... should have remembered that!

Douglas Ruisaard


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Mark Wieder via use-livecode
Sent: Wednesday, December 9, 2020 5:46 PM
To: Douglas A. Ruisaard via use-livecode
Cc: Mark Wieder
Subject: Re: return "error" code from standalone compile

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
  ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return "error" code from standalone compile

2020-12-09 Thread Mark Wieder via use-livecode

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
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


return "error" code from standalone compile

2020-12-09 Thread Douglas A. Ruisaard via use-livecode
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?

Douglas Ruisaard
Trilogy Software




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode