Revision history for KeyPgFix
Revision [21606]
Last edited on 2016-10-29 05:11:14 by fxm [Removed the syntaxes not true for 64-bit]Deletions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]]
Additions:
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgSingle|single]] ) [[KeyPgAs|as]] [[KeyPgSingle|single]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]] ) [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]]
Equivalent to: ##[[KeyPgSgn|Sgn]](//number//) * [[KeyPgInt|Int]]([[KeyPgAbs|Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. For integer types, the number is returned unchanged.
Note: this function is also equivalent to ##//number// - [[KeyPgFrac|Frac]](//number//)##.
The ##**Fix**## unary ##[[KeyPgOperator|operator]]## can be overloaded with user defined types.
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- ##[[KeyPgInt|Int]]##
- ##[[KeyPgFrac|Frac]]##
- ##[[KeyPgCint|Cint]]##
- ##[[KeyPgOperator|Operator]]##
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]] ) [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Fix** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]]
Equivalent to: ##[[KeyPgSgn|Sgn]](//number//) * [[KeyPgInt|Int]]([[KeyPgAbs|Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. For integer types, the number is returned unchanged.
Note: this function is also equivalent to ##//number// - [[KeyPgFrac|Frac]](//number//)##.
The ##**Fix**## unary ##[[KeyPgOperator|operator]]## can be overloaded with user defined types.
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- ##[[KeyPgInt|Int]]##
- ##[[KeyPgFrac|Frac]]##
- ##[[KeyPgCint|Cint]]##
- ##[[KeyPgOperator|Operator]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUlongint ulongint]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]]
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. For integer types, the number is returned unchanged.
Note: this function is also equivalent to ##//number// - [[KeyPgFrac Frac]](//number//)##.
The ##**Fix**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types.
- In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded.
- ##[[KeyPgInt Int]]##
- ##[[KeyPgFrac Frac]]##
- ##[[KeyPgCint Cint]]##
- ##[[KeyPgOperator Operator]]##
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgSingle single]] ) [[KeyPgAs as]] [[KeyPgSingle single]]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUlongint ulongint]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]]
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. For integer types, the number is returned unchanged.
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUinteger uinteger]] ) [[KeyPgAs as]] [[KeyPgUinteger uinteger]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Fix** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgUlongint ulongint]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]]
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##. For integer types, the number is returned unchanged.
Deletions:
Additions:
//result// = **Fix**( //number// )
Deletions:
Additions:
Returns the integer part of a number, rounding towards zero
the floating-point number to truncate
Returns the integer part of ##//number//##, rounding towards zero.
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##.
Note: this function is also equivalent to ##//number// - [[KeyPgFrac Frac]](//number//)##.
- ##[[KeyPgFrac Frac]]##
the floating-point number to truncate
Returns the integer part of ##//number//##, rounding towards zero.
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##. For example, ##**Fix**(1.3)## will return ##1.0##, and ##**Fix**(-4.9)## will return ##-4.0##.
Note: this function is also equivalent to ##//number// - [[KeyPgFrac Frac]](//number//)##.
- ##[[KeyPgFrac Frac]]##
Deletions:
the decimal number to truncate
Returns the integer part of a number.
Equivalent to: ##[[KeyPgSgn Sgn]](//number//) * [[KeyPgInt Int]]([[KeyPgAbs Abs]](//number//))##.