newLISP Fan Club

Forum => newLISP in the real world => Topic started by: lyl on December 06, 2018, 05:04:10 PM

Title: string evaculat in (if ...)
Post by: lyl on December 06, 2018, 05:04:10 PM
Here is my code:


(setq file-name-extension ".csv")
(if file-name-extension file-name-extension "")


I think the "if" expression should return a string ".csv", but I get nil.

Why is file-name-extension in the true part of the "if" expression not evaculated?
Title: Re: string evaculat in (if ...)
Post by: TedWalther on December 06, 2018, 05:13:45 PM
Your example works for me, using newlisp 10.7.4 on Ubuntu. what version of newlisp are you using?
Title: Re: string evaculat in (if ...)
Post by: lyl on December 06, 2018, 05:22:23 PM
@TedWalther

I'm very sorry. Now it does work and get the result I want.

I don't know why? Maybe I make some mistake?

newLISP-10.7.1 I use in Win7.

And many thanks for your prompt response!!