Jump to content

Update a dcl Lisp


mhy3sx

Recommended Posts

15 hours ago, mhy3sx said:

I try this but is not working

 

Couple of things to think about. Lists in LISP tend to start at item 0, and not item 1 (in a list A B C D the 'A' is in position 0) - you'll have to check the if statements above are looking for 1 to 4.. (in a list A B C D E that would be 'B' 'C' 'D' and 'E') - I think the same is true with DCL

 

The nil error you are getting - if you don't select an item in the drop down box then the value of MyAnswer will be the default value you set at the start of the list, in this case, 'nil', if you arn't searching for 'nil' in your cond statements then the values of T1 and T2 won't be set. So you could set MyAnswer at the start to a value, 0 perhaps, or put a t condition in the conds (if none of the above match then do this) - an internet search will help you there.

 

 

 

... so set the default MyAnswer to 0 instead of nil and set the 'conds' to 0 - 3 and not 1 - 4

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...