The original program, function converts A decimal parameters into A hexadecimal number b, A, now requires no changes to the function to after A run to get the number of b for the decimal number, should be how to deal with before calls A function, pass parameters to A, A, don't change function demands are the decimal number?
CodePudding user response:
It's all the same number of computer, no matter what hexadecimal,Hexadecimal representation only to our human senses, only want to display a string representation for, let's see, hexadecimal just have difference,
Your instructions or code distance
CodePudding user response:
Are you still with the codeCodePudding user response:
Said A little blurred, the way you did the function of A number processing, such as A doing what?Or is he just a simple conversion function?
CodePudding user response:
If the latter, I can only guess your intention, especially b, how long? The string? Is a string of words, have to add something, such as the original hex 11 AA, the output is after 11 "AA" or "AA" 11 or 11 "aah" or other things inIf it is the same, that meaning is equivalent to "A decimal number m, find A decimal number n, and requires A (n)=m" (A) is your function?
CodePudding user response:
Such a wonderful work demand, the following is a function of the inverse functionfunction (p: string) : a string;
The begin
Result:=Format (' % 'x, [strtoint (p)));
end;
The function inva (p: string) : string;
The begin
Result:=IntToStr (StrToInt (' $' + p));
end;
Procedure TForm1. Button1Click (Sender: TObject);
The begin
ShowMessage (a (inva (' 112233 ')));
end;
CodePudding user response:
Through learningCodePudding user response:
Unless your Numbers are expressed in string, or no into the system, are binary,