Sather Home Page

Section 8.12.1.1:
$NFE

create( val : CARD ) : NTP ; -- This routine creates a number from the cardinal value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. create( val : FIELD ) : NTP ; -- This routine creates a number from the field number value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. create( val : INT ) : NTP ; -- This routine creates a number from the integer value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. create( val : INTI ) : NTP ; -- This routine creates a number from the infinite integer value -- parameter, provided that val is also a member of the target number domain, -- otherwise void. create( val : RAT ) : NTP ; -- This routine creates a number from the rational value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. create( val : FLT ) : NTP ; -- This routine creates a number from the floating point value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. create( val : FLTD ) : NTP ; -- This routine creates a number from the floating point value parameter, -- provided that val is also a member of the target number domain, otherwise -- void. is_exact : BOOL ; -- This feature returns true if and only if the value of self is an -- exact whole number. is_limited : BOOL ; -- This feature returns true if and only if the domain of NTP is finite. is_signed : BOOL ; -- This feature returns true if and only if the domain of NTP includes -- values below zero. is_pos : BOOL ; -- This feature returns true if and only if self is greater than zero. one : NTP ; -- This returns a value which is numerically one greater than the value -- zero in the appropriate number representation. abs : NTP ; -- This routine returns the absolute value of self providing that that -- is representable in the appropriate number domain. sign : NUM_SIGNS ; -- This feature returns the signed state of self - Negative, Zero or -- Positive.
Language Index Library Index Numeric Index
Comments or enquiries should be made to Keith Hopper.
Page last modified: Friday, 23 March 2001.
Produced with Amaya