Author Topic: Display format of "Real" numbers  (Read 2109 times)

0 Members and 1 Guest are viewing this topic.

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
Display format of "Real" numbers
« on: April 25, 2009, 08:00:57 AM »
I've been playing with the CDATE variable for the first time, although I assume this will affect *all* real numbers.

By default it returns, for example, 2.00903E+07, which as a number reads "20090400," seemingly missing anything more detailed than the month, but more importantly, particularly for other numbers, is harder to read.

I can get it to read a fuller value, "20090425.12455829," using the RTOS function, but obviously, since it's the primary purpose of RTOS, this turns the figure into a string.

Is there a way to change the way real numbers are displayed?

This is more a case of asking out of interest, I've been playing with a number of ways of using arithmetic ways to get particular results.

dJE
===
dJE

Joe Burke

  • Guest
Re: Display format of "Real" numbers
« Reply #1 on: April 25, 2009, 09:33:45 AM »
Keep in mind, the way numbers are *displayed* is generally not relavent to how they are *stored* in LISP variables.

ziko30

  • Newt
  • Posts: 51
Re: Display format of "Real" numbers
« Reply #2 on: April 25, 2009, 03:13:18 PM »
Hi,
 
Something to look into: you can set the PRECISION and FORMAT displayed using the LUPREC and LUNITS system variables respectively.  The examples below are given in the help file. That said...I found these variables had no effect on the Display of CDATE for me.  But someone with a lot more experience with ALisp might shade more light on displaying reals.

Report formats: (Examples)

1. Scientific 1.55E+01

2. Decimal 15.50

3. Engineering 1'-3.50"

4. Architectural 1'-3 1/2"

5. Fractional 15 1/2



============== Acad Map 3D 2009================