iconv() function

The iconv() function converts a value from its external format to its internal equivalent, according to the processing code being applied.


iconv(str.exp, conv.exp)


str.exp Specifies the external value to convert to its equivalent internal value.
conv.exp Specifies the processing code to use for the conversion.


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")

This example converts check.date to internal format, using the d conversion.

check.date = "02/27/02"
print iconv(check.date,"d")

This example performs an AQL group extract of two groups.

string = red*blue*green*yellow*orange
print iconv(string,’g0*2’)

If ans contains y or n, the statements following the then clause are executed.

input ans,1
if iconv(ans,"p(’y’);(’n’)")#"" then...