Xbasic

CSTATE Function

Syntax

State_Name as C = CSTATE(C state_abbreviation)

Arguments

state_abbreviation

The two character code for a US state or Canadian province.

Description

Converts a two character state abbreviation to its full state name.

Discussion

CSTATE() converts a two-character string containing a State_Code to its full State_Name. Note : Canadian province codes and names can also be processed with this function.

Example

cstate("NY") "New York"
cstate(STATE) "New York", if STATE contains "NY"
cstate(STATE_PROV) "Saskatchewan", if STATE_PROV contains "SK"

See Also