Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Streeng array to number array conversion

Status
Not open for further replies.

dzavad

Programmer
Apr 17, 2000
167
US
I am trying to convert parameter streeng array to number array. I dont know how to do that..Any sugestions? I have
{?Site} parameter array in streeng format and it is produsing numbers like "1", "2", etc...but its a streeng. I need to conver it to numbers array 1,2,3,...
 
The following should work:
Code:
StringVar array x := {?Site} ;
NumberVar array y ;
Redim Preserve y[Count(x)] ;
Local NumberVar i := 1 ;

For i := 1 to Count(x) do
(
y[i] := ToNumber( x[i] )
);



Bob Suruncle
 
How many sites do you have in your default values list of the paramter?
You could make your parameter a number, load the number values, give each one a description, then just display the descritpion when prompted for the paramter.
When you use your parameter in a formula, it will use the values that correspond to the descriptions chosen.

~Brian
 
Thanks for the formula...it helped a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top