Einzelnen Beitrag anzeigen
Alt 16.06.2007, 17:26   #36
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA DIVIDE

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

Teilt eine Zahl (oder Datum) mit einer anderen ohne Null-Teilung.
Divide 1 number (or date) by another without zero divide

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 performs a simple divide on two numbers. However, it
also prevents a zero divide occurring.
This may be useful to users of Screen Forms or Programmer who otherwise
have to check the divisor or suffer rude messages from Open Access.

S y n t a x
Code:
result = call ('DIVIDE' , value1 , value2)
P a r a m e t e r
value1 - an integer or decimal, the value to be divided
value2 - an integer or decimal, the divisor
result - a decimal value. If the divisor is zero then the result
is set to 0.0

R e t u r n s
A decimal value

B e i s p i e l / E x a m p l e
Code:
attach 'TOOLS'
put call ('DIVIDE' , 21 , 3) ! prints 7.00000
a = 10.0
b = 0
put call ('DIVIDE' , a , b) ! prints 0.00000 without a warning
! message appearing
detach 'TOOLS'
Q u e r v e r w e i s / R e f e r e n c e
PERCENT
Angehängte Dateien
Dateityp: oac TOOLS.OAC‎ (18.5 KB, 2x aufgerufen)
RKabis ist offline   Mit Zitat antworten