PDA

View Full Version : $ Variables $


clausb
08-26-2004, 08:01 AM
Hmmm... global variables aren't pretty, so I'd tend to avoid them wherever possible. Anyway, in def.lsp you try to retrieve the value of *asdf* like this:

(setf sc1 (getf *asdf*))


This isn't valid LISP syntax. To assign the variable, simply write

(setf sc1 *asdf*)


Another potential problem: *asdf* is a global variable in the package osd-package, but not exported. If you need to access the variable from a different package, you must specify the package:

(setf sc1 osd-package::*asdf*)


Hope this helps,

Claus

John Scheffel
08-26-2004, 09:24 AM
It seems that both Claus and I have achieved great psychic powers and can now answer questions even before they are asked :D.

Something odd is going on with the time stamps. If it persists I will investigate.

g2sv
08-26-2004, 05:59 PM
Hi,
I was trying to pass some values from abc.lsp to def.lsp,(both are attachedl) but from the first program it self i can not assign value to it.
First i want to run abc.lsp and i want to pass value or *asdf* to def.lsp as a initial value. can anybody help me out ?


Best Regards,
Gav.

g2sv
08-29-2004, 10:59 PM
Thanks Calus and john.....

Calus,
acctually i know (setf sc1 *asdf*) is the correct santax, i have tried so many times but my first program abc.lsp it self not assigning value to it. so i thought i may be worng i have tired to do it in diffrent way.
Even after your reply i have done changes but my first program was not still not assigning vlaue. but, there was not fault of program santax. i was executing it in a worng way....

The fault was i was changing value of using slider in dialog box not by giving input in dialgo box. As i have used after-input to assgin value to global variable. so abc.lsp will not going to assign value to it unless and until i give input value to it. it was my fault i have realized after your reply.

I also know global variables are not good thing but some times you have to use it... i will discuss this issue later....

John,
i don't think it is due to administrative powers i think that is due to huge time diffrence between your and mine time zone.

Thanks,
Gav.

John Scheffel
08-31-2004, 08:36 AM
Originally posted by g2sv
i don't think it is due to administrative powers i think that is due to huge time diffrence between your and mine time zone.
The vBulletin software is supposed to handle time zone differences and keep the posts in chronological order. It should show each user viewing the forum their local time, but internally it should use a consistent time stamp for each post. You might want to check your time zone setting to make sure it is correct. Click the user cp button at the top of any window, then click Edit Options and check the Date & Time Options.