UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

OCONV Range (R) Syntax OCONV(num.expr, "Rndm[;ndm.....]") Description The OCONV range (R) function returns only those data values that fall into a specified range of decimal values. When including a negative range, you must specify the highest negative number first. If range specifications are not met, UniData returns an empty string. If the input value or conversion code is invalid, UniData returns the input value. Note: In BASICTYPE P, OCONV returns an empty string if UDT.OPTIONS 56 is on and the input value or conversion code is invalid. Parameters The following table describes each parameter of the syntax. Parameter Description 1-519 UniBasic Commands Reference num.expr Indicates a string to be searched. n Specifies the smallest number to be extracted. d Specifies a delimiter separating numbers in a range. Any character except system delimiters can be used to separate the numbers in a range. Do not use the minus sign (-) as a delimiter because it refers to a negative number in the range. m Specifies the longest string to be extracted. ; Separates multiple ranges. OCONV Range (R) Parameters

Example In the following example, the program segment prints “123” and a blank line because X is within the range and Y is not: X = 123; Y = 456789 PRINT OCONV(X,"R100,200") PRINT OCONV(Y,"R100,200") Related Command UniBasic ICONV Range (R) OCONV Range (R) 1-520

Example<br />

In the following example, the program segment prints “123” and a blank line because<br />

X is within the range and Y is not:<br />

X = 123; Y = 456789<br />

PRINT OCONV(X,"R100,200")<br />

PRINT OCONV(Y,"R100,200")<br />

Related Command<br />

<strong>UniBasic</strong><br />

ICONV Range (R)<br />

OCONV Range (R) 1-520

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!