Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alternative to Val() Function
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00106049
Message ID:
00106118
Views:
27
>Hello:
>
>I'm debugging some code that won't pick up codes that have
>non-numeric characters in them. The code uses the val() function
>which returns numeric values from a character expression composed of numbers. Is there an alternative function that I'm missing that will
>pick up both numeric and non-numeric codes?. My code is as follows:
>
>With thisform.list1
>.boundcolumn = 2
>.columncount = 2
>.columnwidths = "570,0"
>.controlsource = "new_course"
>.rowsourcetype = 3
>
>Do case
>Case val(right(new_course,4) = 0
>.rowsource = "select desc_e, code from studies;
>where right(code,5) = '0';
>and left(new_course,2) = left(code,2) into cursor course3;
>select course3
>
>This works fine but is there is a code with a letter included it will
>list in my listbox but won't select.
>Any help would be greatly appreciated.
>Thank oyu.


ISDIGIT() and/or ISALPHA() can probably help you...


:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform