Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Dave

#1
newLISP in the real world /
October 09, 2005, 03:45:25 PM
Very informative answer, Lutz! It shows me some things I will have to study.



Thanks. I'm a fan!
#2
newLISP in the real world /
October 09, 2005, 01:53:10 PM
(set 'x (exec "ls /a_directory")) --- x will be the contents of the directory.

(set 'x (exec "ls /empty_directory")) --- x will be empty.



But this is where I have trouble understanding:



(set 'x (exec "ls /not_a_directory"))  --- x will be empty NOT null, and the OS will output an error message.

(set 'x (exec "not_an_instruction"))  --- x will be empty NOT null, and the OS will output an error message.



I am trying to test for failed calls to the system, and deal with them before they are sent to the output. Should I be using some form of catch/throw? How is it used in this way?
#3
newLISP in the real world /
October 08, 2005, 09:31:05 AM
I'm using newLISP as a scripting language under FreeBSD.



I am unclear about the term "return value", whether it is the data returned from the system process (say, a directory), or if it is the exit status of the process (success/fail). The reference says "The return value  true is the process was successfully launched, else nil" (I think is s/b "if" btw). I am looking for the status of the process in this instance. I tried to query "$?", with the same results; nil on both pass and fail.
#4
newLISP in the real world / Return value
October 07, 2005, 07:55:17 PM
How does one get the return value for exec?



(set 'x (exec "command")) seems to return a nil x, regardless if the command is successful or not.
#5
newLISP in the real world /
June 05, 2003, 08:13:03 PM
I have mysql.lsp v1.3 with 16 definitions to initialize navigate query and close, but not write data to database.
#6
newLISP in the real world / MySQL Read Only?
June 01, 2003, 11:01:31 AM
There are no newlisp functions to write to a MySQL database. It is read only. Are you going to add these soon? It would be useful.