Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Integer – PB Docs 2022 – PowerBuilder Library

Integer – PB Docs 2022

Integer

PowerScript function

Description

Converts the value of a string to an integer or obtains an integer
value that is stored in a blob.

Syntax

Argument

Description

stringorblob

A string whose value you want returned as an integer or a
blob in which the first value is the integer value. The rest of
the contents of the blob is ignored. Stringorblob can also be an
Any variable containing a string or blob.

Return value

Integer.

Returns the value of stringorblob as an integer if it succeeds and 0
if stringorblob is not a valid number or is an incompatible datatype. If
stringorblob is null, Integer returns null.

Usage

To distinguish between a string whose value is the number 0 and a
string whose value is not a number, use the IsNumber function before
calling the Integer function.

Examples

This statement returns the string 24 as an integer:

This statement returns the contents of the SingleLineEdit sle_Age as
an integer:

This statement returns 0:

This example checks whether the text of sle_data is a number before
converting, which is necessary if the user might legitimately enter
0:

After assigning blob data from the database to lb_blob, this example
obtains the integer value stored at position 20 in the blob:

See also

Double

Dec

IsNumber

Long

Real

Integer method for DataWindows in the section called “Integer” in DataWindow Reference.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x