PickBASIC / FlashBASIC
iconv() function
.mdThe iconv() function converts a value from its external format to its internal equivalent, according to the processing code being applied.
⚡Try ICONV codes live in the Conversion Lab: dates, money, time, hex.→Syntax
iconv(str.exp, conv.exp)Parameter(s)
| str.exp | Specifies the external value to convert to its equivalent internal value. |
| conv.exp | Specifies the processing code to use for the conversion. |
Example(s)
This example converts check.amount to internal format, using the "mr2" conversion. Run time multiplies by 100 and truncates the decimal
portion.
check.amount = 12.5 print iconv(check.amount,"mr2") ;* 1250
This example converts check.date to internal
format, using the d conversion.
check.date = "02/27/02" print iconv(check.date,"d") ;* 12477
This example performs an AQL group extract of two groups.
string = red*blue*green*yellow*orange print iconv(string,’g0*2’) ;* red*blue
If ans contains y or n, the statements following the then clause
are executed.
input ans,1 if iconv(ans,"p(’y’);(’n’)")#"" then...
See also
Conversion expression→d (date) processing code→date command→BASIC functions→m (mask) processing code→Masking→match relational operator→mc (mask character) processing code→mp (mask packed decimal) processing code→mt (mask time) processing code→mx (mask ASCII to hexadecimal) processing code→my (mask hexadecimal to ASCII) processing code→oconv() function→set-date-std command→Statements and functions→t (text extraction) processing code→t (translate) processing code→User exits→
Referenced by
8 topics mention iconv() function in its description.