Revision history for KeyPgSgn


Revision [21135]

Last edited on 2016-03-13 10:49:42 by fxm [Formatting]
Additions:


Revision [20521]

Edited on 2016-02-10 16:08:40 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Sgn** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Sgn** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Sgn** ( [[KeyPgByval|byval]] //number// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
The ##**Sgn**## unary ##[[KeyPgOperator|operator]]## can be overloaded with user defined types.
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- ##[[KeyPgAbs|Abs]]##
- ##[[KeyPgOperator|Operator]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgDouble double]] ) [[KeyPgAs as]] [[KeyPgDouble double]]
The ##**Sgn**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types.
- In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded.
- ##[[KeyPgAbs Abs]]##
- ##[[KeyPgOperator Operator]]##


Revision [17684]

Edited on 2015-06-12 06:05:05 by FxMwikki [Suppressed the no-relevant keyword 'Overload' in Syntax]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]


Revision [17109]

Edited on 2014-06-25 14:35:48 by CountingPine [Explain behaviour for unsigned numbers]
Additions:
The required ##//number//## argument can be any valid numeric expression. Unsigned numbers will be treated as if they were signed, i.e. if the highest bit is set the number will be treated as negative, and ##-1## will be returned.
Deletions:
The required ##//number//## argument can be any valid numeric expression.


Revision [16915]

Edited on 2013-08-12 11:31:33 by CountingPine [Add more overloads; remove pointless section about "uninitialised" variables; etc]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** [[KeyPgOverload overload]] ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Sgn** ( [[KeyPgByval byval]] //number// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
the number to find the sign of
- If //number// is greater than zero, then ##**Sgn**## returns ##1##.
- If //number// is equal to zero, then ##**Sgn**## returns ##0##.
- If //number// is less than zero, then ##**Sgn**## returns ##-1##.
The required ##//number//## argument can be any valid numeric expression.
DIM N AS INTEGER = 0
Deletions:
the number
- If //number// is greater than zero, then SGN returns 1.
- If //number// is equal to zero, then SGN returns 0.
- If //number// is less than zero, then SGN returns -1.
The required ##//number//## argument can be any valid numeric expression. If ##//number//## is an uninitialized variable, zero is returned.
DIM N AS INTEGER


Revision [14024]

Edited on 2008-12-13 12:54:30 by LaananFisher [Updated: minor formatting]
Additions:
//result// = **Sgn**( //number// )
Deletions:
//result// = **Sgn** ( //number// )


Revision [12444]

The oldest known version of this page was created on 2008-01-18 14:25:50 by JeffMarshall [Updated: minor formatting]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode