Einzelnen Beitrag anzeigen
Alt 14.06.2007, 21:06   #35
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA ABS

E r g e b n i s / R e s u l t

Liefert den aktuellsten Wert einer Zahl.
Return the absolute value of a number.

B e s c h r e i b u n g / D e s c r i p t i o n
This function returns the absolute (positive) value of an integer or
decimal passed to it. This function is useful when calculating the
difference between two numbers as it always gives a positive value.

S y n t a x
Code:
value = call ('ABS' , value)
P a r a m e t e r
value - is any integer or decimal value.

R e t u r n s
Returns a number of the same type as that passed to it.

B e i s p i e l / E x a m p l e
Code:
attach 'tools'
put call ('ABS' , -4.5) ! prints 4.5
a = 10.4 - 20.6
b = call ('ABS' , a) ! b contains 10.2
detach 'tools'
Angehängte Dateien
Dateityp: oac TOOLS.OAC‎ (18.5 KB, 4x aufgerufen)
Dateityp: txt TOOLS.TXT‎ (6.5 KB, 2x aufgerufen)
RKabis ist offline   Mit Zitat antworten