Author Topic: (type (read item))  (Read 6269 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

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #15 on: October 01, 2014, 05:46:37 PM »
weird....

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


hmspe

  • Bull Frog
  • Posts: 362
Re: (type (read item))
« Reply #16 on: October 01, 2014, 07:21:47 PM »
Could I ask what software you are using and which version?  Are you loading any lisp routines or third party add-ons?  Have you tried rebooting and re-testing?  I have seen some strange things in Bricscad when local variables in lisp routines are not properly localized, but it only happens after several hours of using the program.  As far as I can tell the un-localized variables accumulate and eventually outgrow the alloted memory space and start overwriting other parts of the program's memory space.
"Science is the belief in the ignorance of experts." - Richard Feynman

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #17 on: October 01, 2014, 11:00:50 PM »
The first time it happened, the machine was running on Bricscad 13.2.8, so I upgraded to v13.2.10 and also tried evaluation copy of v14.
Without luck.
No 3rd party software is installed.
We do use our own routines, but they run fine on 40 other machines, running on different versions of Bricscad and Autocad.

hmspe

  • Bull Frog
  • Posts: 362
Re: (type (read item))
« Reply #18 on: October 01, 2014, 11:23:18 PM »
I recommend filing a bug report at the Bricscad site.  I'm not sure they can duplicate the problem but I'm sure someone there will look.

Your code worked properly on V14 here.
"Science is the belief in the ignorance of experts." - Richard Feynman

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: (type (read item))
« Reply #19 on: October 02, 2014, 12:18:00 AM »
As a general recommendation :
If the issue is related to a specific application please mention the application and build in the original post.
I had assumed the problem related to AutoCAD 2015 ...  :|


Have a little respect for the time and effort expended by people trying to assist solve the issue.


 

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: (type (read item))
« Reply #20 on: October 02, 2014, 12:40:07 AM »
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

Great link Chris.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (type (read item))
« Reply #21 on: October 02, 2014, 02:17:29 AM »
The first time it happened, the machine was running on Bricscad 13.2.8, so I upgraded to v13.2.10 and also tried evaluation copy of v14.
Without luck.
No 3rd party software is installed.
We do use our own routines, but they run fine on 40 other machines, running on different versions of Bricscad and Autocad.
Cop-out answer (sorry):

Have you tried uninstalling completely and then reinstalling? Sometimes a bug might have crept in (e.g. bad hard drive) and simply upgrading/updating doesn't always replace all the files.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: (type (read item))
« Reply #22 on: October 02, 2014, 02:51:22 AM »
another test I did

: (setq a "0.01")
"0.01"
: (atof a)
0.01
: (type (read a))
SYM
Works for me... Bricscad 14.2.17
: (type(read "0.01"))
REAL
« Last Edit: October 02, 2014, 02:55:21 AM by snownut2 »

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: (type (read item))
« Reply #23 on: October 02, 2014, 04:07:45 AM »
Tested on BC V13.2.10:
Code: [Select]
(type (read "0.01")) => REALThe OS setting for the decimal separator makes no difference (dot or comma).

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: (type (read item))
« Reply #24 on: October 02, 2014, 04:12:45 AM »

Peter Guappa

  • Guest
Re: (type (read item))
« Reply #25 on: October 02, 2014, 07:35:57 AM »
updating bricscad => no luck
reinstalling bricscad => no luck
reinstalling as administrator = SUCCES

Thanks Roy !

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: (type (read item))
« Reply #26 on: October 02, 2014, 08:24:21 AM »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: (type (read item))
« Reply #27 on: October 02, 2014, 09:26:54 AM »
Roy great job!
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: (type (read item))
« Reply #28 on: October 03, 2014, 02:55:07 AM »
I am glad that I was able to help. But I don't know if digging something up from the (very) back of your mind qualifies as 'sleuthing'. :-D

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: (type (read item))
« Reply #29 on: October 03, 2014, 08:20:02 AM »
Hummm. I have a hole back there and every time I add something, something else gets pushed out.  :(
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.