( |
|
|
|||
Data conversion - from String to Value |
Parameters: | |
String with value | |
subtype for Value Type | |
global procedure CalcExtra(val bp,string extra,var val res) BEGIN string 255 tstr; val v; res = blankval; tstr = extra; if (nonblank(tstr)) then begin if (Mid(tstr,len(tstr)-1,1)=="%") then begin tstr = Left(tstr,len(tstr)-1); v = StringToVal(tstr,M4Val); res = bp*v; res = res/100; end else begin res = StringToVal(tstr,M4Val); end; end; RETURN; END;
Related topics: |