Skip to main content
Solved

float to integer

  • September 23, 2024
  • 2 replies
  • 134 views

Forum|alt.badge.img

Hi,

 

Is there a way to change variable from float to integer?

I want to use it to write list of polygons in loop:

for i:n:

polygon_name 1.pob

polygon_name 2.pob

polygon_name 3.pob

….

In other words, i dont want something like that:

 

Thanks,

Nadav

…..

 

Best answer by Sean Turner

Use the FORMAT keyword to change to an integer. 

FORMAT m INT 
The optional keyword INT indicates the value should be first converted to an integer and printed in integer format using the number of places specified by m.

2 replies

Sean Turner
Fully Spectral
Forum|alt.badge.img+1
  • Fully Spectral
  • Answer
  • September 23, 2024

Use the FORMAT keyword to change to an integer. 

FORMAT m INT 
The optional keyword INT indicates the value should be first converted to an integer and printed in integer format using the number of places specified by m.


Forum|alt.badge.img
  • Author
  • Fully Spectral
  • September 23, 2024

Hi Sean,

It works,

Thank you very much,

Nadav