03-09-2015, 01:11 PM
When given a String like "#AAh". How can that be changed to an integer constant #AAh?
I had in mind that CAS(String) is a way to convert a String to its (cas)meaning. Is that right? And why would that not work in the given example.
Please also look at the code:
edit: remembering Han's tutorial about cas programs I tried locally assigning str:="#"+X+"h"; CAS(str); which SEEMS to work better, but apparently always leads to everything but the desired result.... dec semms to be preferred.
Can someone help with the functionality I am looking for?
I had in mind that CAS(String) is a way to convert a String to its (cas)meaning. Is that right? And why would that not work in the given example.
Please also look at the code:
Code:
EXPORT INT_HEX(X)
BEGIN
CASE
IF TYPE(X)==0 THEN R→B(X,32,4); END;
IF TYPE(X)==1 THEN SETBASE(X,Base); END; //Base has already been set to 3
IF TYPE(X)==2 THEN CAS("#"+X+"h"); END; //input String like "AA" should return #AAh
DEFAULT "";
END;
// R→B(X,32,4);
END;
edit: remembering Han's tutorial about cas programs I tried locally assigning str:="#"+X+"h"; CAS(str); which SEEMS to work better, but apparently always leads to everything but the desired result.... dec semms to be preferred.
Can someone help with the functionality I am looking for?