How to convert a floating-point number into a string in SKIL

M

madhero

Guest
I have find out how to convert an integer into a string in SKILL, but
how can I convert a floating-point number into a string? I need to put
the calculated result to a stringfield.

The way to convert an integer to a string is like that:
integer=50
strcat(concat(integer))
 
On Jun 24, 5:42 am, "S. Badel" <stephane.ba...@REMOVETHISepfl.ch>
wrote:
I have find out how to convert an integer into a string in SKILL, but
how can I convert a floating-point number into a string? I need to put
the calculated result to a stringfield.

The way to convert an integer to a string is like that:
    integer=50
    strcat(concat(integer))

much simpler :

  sprintf(nil "%d" myint)

for a float :

  sprintf(nil "%f" myfloat)

You can use normal printf formatting.

Another option is aelSuffixNotation() and aelEngNotation() that will convert a number to a string in
suffix or engineering notations.

Cheers,
Stéphane
There's another function I found to solve this issue:
artMakeString().
 

Welcome to EDABoard.com

Sponsor

Back
Top