Author Topic: (type (read item))  (Read 6267 times)

0 Members and 1 Guest are viewing this topic.

Peter Guappa

  • Guest
(type (read item))
« on: October 01, 2014, 01:11:52 PM »
When I enter
(type (read "0.01"))
it returns SYM instead of REAL

How is this possible?

(On another computer, with the same configuration, it does returns REAL)

Thanks!
Peter

owenwengerd

  • Bull Frog
  • Posts: 451
Re: (type (read item))
« Reply #1 on: October 01, 2014, 01:43:05 PM »
You typed the letter "O" instead of the numeral zero.

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #2 on: October 01, 2014, 01:46:06 PM »
No I did not!

hmspe

  • Bull Frog
  • Posts: 362
Re: (type (read item))
« Reply #3 on: October 01, 2014, 01:57:18 PM »
Are you typing this manually?  If so I agree that what Owen wrote is the most likely cause.   If this is part of a lisp routine that you load then the only reasonable possibility other than typing the letter O instead of the number 0 is that the two computers do not have exactly the same software and exactly the same add-ons and lisp routines.
"Science is the belief in the ignorance of experts." - Richard Feynman

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #4 on: October 01, 2014, 02:01:44 PM »
I've checked multiple times !!!
Both computers are running the same software and routines!!!

ronjonp

  • Needs a day job
  • Posts: 7529
Re: (type (read item))
« Reply #5 on: October 01, 2014, 02:09:14 PM »
I've checked multiple times !!!
Both computers are running the same software and routines!!!
OK!!!

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

owenwengerd

  • Bull Frog
  • Posts: 451
Re: (type (read item))
« Reply #6 on: October 01, 2014, 02:28:56 PM »
No I did not!

I think you are mistaken.

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #7 on: October 01, 2014, 02:38:14 PM »
Attached 2 images.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: (type (read item))
« Reply #8 on: October 01, 2014, 02:56:02 PM »
Hi,

On the computer which return the SYM type, is the dot (.) set as decimal separator ?

Here:
Quote
Commande: (type (read "0.0011"))
REAL
Commande: (type (read "0,0011"))
SYM
Speaking English as a French Frog

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #9 on: October 01, 2014, 03:17:36 PM »
Do you mean the Windows setting?
In Windows the dot (.) is set as decimal separator.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: (type (read item))
« Reply #10 on: October 01, 2014, 04:09:22 PM »
Two things worth looking into:
1.
Check what (type (read "1")) returns on both machines.
2.
Type "0.0011" in a text file on both machines and compare the files.

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #11 on: October 01, 2014, 04:15:26 PM »
"1" returns INT on both
"0.0011" returns SYM and REAL (copied from the same textfile)

ChrisCarlson

  • Guest
Re: (type (read item))
« Reply #12 on: October 01, 2014, 04:26:26 PM »
Do you mean the Windows setting?
In Windows the dot (.) is set as decimal separator.

On the machine returning SYM is comma a decimal separator? Its a very common problem when dealing with multiple regions.

http://www.copsmodels.com/gpcommapnt.htm
« Last Edit: October 01, 2014, 04:30:06 PM by ChrisCarlson »

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #13 on: October 01, 2014, 04:29:21 PM »
On both machines the decimal separator is a dot (.)

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #14 on: October 01, 2014, 04:55:38 PM »
another test I did

: (setq a "0.01")
"0.01"
: (atof a)
0.01
: (type (read a))
SYM