Revision history for KeyPgLen


Revision [22005]

Last edited on 2017-11-21 01:11:18 by JeffMarshall [fix page link name case]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[KeyPgZstring|zstring]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
Deletions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[KeyPgZString|zstring]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]


Revision [20958]

Edited on 2016-03-13 04:16:18 by fxm [Formatting]

No Differences

Revision [20290]

Edited on 2016-02-10 16:01:59 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[KeyPgString|string]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[KeyPgZString|zstring]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[KeyPgWstring|wstring]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **Len** ( [[KeyPgByref|byref]] //expression// [[KeyPgAs|as]] [[DataType|datatype]] ) [[KeyPgAs|as]] [[DataType|datatype]]
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Len** ( //datatype// ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
//result// = **Len**( [[DataType|DataType]] )
A [[DataType|DataType]].
Returns the size of an expression or [[DataType|DataType]] in bytes.
##**Len**## returns the length of an expression or the size of a [[DataType|DataType]], in bytes.
In the first form, if ##//expression//## is of type ##[[KeyPgString|String]]##, ##[[KeyPgWstring|Wstring]]## or ##[[KeyPgZstring|Zstring]]##, the length of the string in characters will be returned. If the expression is of a user defined type, an ##[[KeyPgOperator|Operator]] **Len**## compatible with that data type is called. Otherwise, the size of the ##//expression//##'s data type in bytes is returned.
In the second form, if ##//expression//## is ##[[KeyPgZstring|Zstring]]## or ##[[KeyPgWstring|Wstring]]##, the size in bytes of an ASCII or Unicode character is returned, respectively. If ##//datatype//## is ##[[KeyPgString|String]]##, the size of the string descriptor type is returned.
The ##**Len**## unary ##[[KeyPgOperator|operator]]## can be overloaded with user defined types.
- ##**Len**## only allows expressions in the //[[CompilerOptlang|-lang qb]]// dialect.
- Can be used with built-in types and user-defined types in the //[[CompilerOptlang|-lang fb]]// and //[[CompilerOptlang|-lang fblite]]// dialects.
- Can be used with built-in types and user-defined types in the //[[CompilerOptlang|-lang fb]]// and //[[CompilerOptlang|-lang fblite]]// dialects.
- None in the //[[CompilerOptlang|-lang qb]]// dialect.
- ##[[KeyPgSizeof|Sizeof]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgZString zstring]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgWstring wstring]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( //datatype// ) [[KeyPgAs as]] [[KeyPgInteger integer]]
//result// = **Len**( [[DataType DataType]] )
A [[DataType DataType]].
Returns the size of an expression or [[DataType DataType]] in bytes.
##**Len**## returns the length of an expression or the size of a [[DataType DataType]], in bytes.
In the first form, if ##//expression//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. If the expression is of a user defined type, an ##[[KeyPgOperator Operator]] **Len**## compatible with that data type is called. Otherwise, the size of the ##//expression//##'s data type in bytes is returned.
In the second form, if ##//expression//## is ##[[KeyPgZstring Zstring]]## or ##[[KeyPgWstring Wstring]]##, the size in bytes of an ASCII or Unicode character is returned, respectively. If ##//datatype//## is ##[[KeyPgString String]]##, the size of the string descriptor type is returned.
The ##**Len**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types.
- ##**Len**## only allows expressions in the //[[CompilerOptlang -lang qb]]// dialect.
- Can be used with built-in types and user-defined types in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects.
- Can be used with built-in types and user-defined types in the //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects.
- None in the //[[CompilerOptlang -lang qb]]// dialect.
- ##[[KeyPgSizeof Sizeof]]##


Revision [17105]

Edited on 2014-06-25 12:31:44 by CountingPine [Add overloads, minor fixups]
Additions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgString string]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgZString zstring]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgWstring wstring]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]

[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[DataType datatype]] ) [[KeyPgAs as]] [[DataType datatype]]
In the first form, if ##//expression//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. If the expression is of a user defined type, an ##[[KeyPgOperator Operator]] **Len**## compatible with that data type is called. Otherwise, the size of the ##//expression//##'s data type in bytes is returned.
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgAny any]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
In the first form, if ##//expression//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. Otherwise an ##[[KeyPgOperator Operator]] **Len**## compatible with that data type is called. Otherwise, the size of the ##//expression//##'s data type in bytes is returned.


Revision [17103]

Edited on 2014-06-25 12:26:07 by CountingPine [Talk about Operator Len, minor fixups]
Additions:
Returns the length of an expression or data type
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //expression// [[KeyPgAs as]] [[KeyPgAny any]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
//result// = **Len**( //expression// )
##//expression//##
An expression of any type.
Returns the size of an expression or [[DataType DataType]] in bytes.
##**Len**## returns the length of an expression or the size of a [[DataType DataType]], in bytes.
In the first form, if ##//expression//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. Otherwise an ##[[KeyPgOperator Operator]] **Len**## compatible with that data type is called. Otherwise, the size of the ##//expression//##'s data type in bytes is returned.
In the second form, if ##//expression//## is ##[[KeyPgZstring Zstring]]## or ##[[KeyPgWstring Wstring]]##, the size in bytes of an ASCII or Unicode character is returned, respectively. If ##//datatype//## is ##[[KeyPgString String]]##, the size of the string descriptor type is returned.
If there is both a user defined type and a variable visible with the same name in the current scope, the user defined type takes precedence over the variable. To ensure that the ##**Len**## takes the variable instead of the user defined type, wrap the argument to ##**Len**## with parentheses to force it to be seen as an expression. For example ##Len((variable))##.
The ##**Len**## unary ##[[KeyPgOperator operator]]## can be overloaded with user defined types.
Deletions:
Returns the length of a variable or data type
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Len** ( [[KeyPgByref byref]] //variable// [[KeyPgAs as]] [[KeyPgAny any]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
//result// = **Len**( //variable// )
##//variable//##
A variable of any type.
Returns the size of a variable or [[DataType DataType]] in bytes.
##**Len**## returns the length of a variable or [[DataType DataType]], in bytes.
In the first form, if ##//variable//## is of type ##[[KeyPgString String]]##, ##[[KeyPgWstring Wstring]]## or ##[[KeyPgZstring Zstring]]##, the length of the string in characters will be returned. Otherwise, the size of ##//variable//##'s type in bytes is returned.
In the second form, if ##//datatype//## is ##[[KeyPgZstring Zstring]]## or ##[[KeyPgWstring Wstring]]##, the size of an ASCII or Unicode character is returned, respectively. If ##//datatype//## is ##[[KeyPgString String]]##, the size of the string descriptor type is returned.
If there is both a user defined type and a variable both having the same name in the same scope, the user defined type takes precedence over the variable. To ensure that the ##**Len**## takes the variable instead of the user defined type, wrap the argument to ##**Len**## with parentheses to force it to be seen as an expression. For example ##Len((variable))##.


Revision [13603]

Edited on 2008-07-21 18:48:19 by JeffMarshall [spelling]
Additions:
If there is both a user defined type and a variable both having the same name in the same scope, the user defined type takes precedence over the variable. To ensure that the ##**Len**## takes the variable instead of the user defined type, wrap the argument to ##**Len**## with parentheses to force it to be seen as an expression. For example ##Len((variable))##.
Deletions:
If there is both a user defined type and a variable both having the same name in the same scope, the user defined type takes precedence over the variable. To ensure that the ##**Len**## takes the variable instead of the user defined type, wrap the argument to ##**Len**## with parantheses to force it to be seen as an expression. For example ##Len((variable))##.


Revision [13445]

The oldest known version of this page was created on 2008-06-08 08:25:48 by JeffMarshall [spelling]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode