I have a few friends on the forum to discuss it. The following is an example:
In LR, C variables and LR parameters are different.
No C variable can be directly called by LR functions.
Lr_eval_string should be used.
For example, {newparam} (parameterized variable in LR) can be referenced directly.
However, if:
Action ()
{
Char A [10];
Strcpy (a, "{newparam }");
Lr_message ();
Return 0;
}
This is incorrect.
Lr_message (a); an error is returned.
But you can write it as lr_message (lr_eval_string (.
Because the value has been taken out.
Let's look at another question: One netizen said:
Action ()
{
Char A [10];
Strcpy (a, "{newparam }");
Lr_message (lr_eval_string ());
If (lr_eval_string (a) [0] = 11 ){
Lr_message ("A = % d", );
}
Return 0;
}
If (lr_eval_string (a) [0] = 11) in is not subject to syntax check.
{Newparam} is parameterized. Content: 11.
Next, I will use lr_message ("A = D", lr_eval_string (a) [0]); In Front Of if to see what it is. The result is: 49 (ASCII code of number 1 ).
That is to say, if (lr_eval_string (a) [0] = 11) is to judge whether the ASCII Code of 1 is equal to 11. The display is not equal. Therefore, the lr_message ("A = % d", a); will not be executed.
Next we will use another piece of code to look at it:
Char * str2 = "T ";
Char A [10];
Strcpy (A, lr_eval_string ("{newparam }"));
Lr_message ("A = % d", lr_eval_string (a) [0]);
Lr_message (lr_eval_string ());
If (lr_eval_string (a) [0] = * str2 ){
Lr_message ("A = % s", );
Lr_message ("execute this sentence! ");
}
The result is as follows:
Starting action.
A = 84
T
A = T
Execute this sentence!
Ending action.
Here, my parameter is an uppercase "T ".
We can see that lr_eval_string (a) [0] obtains the ASCII code of the uppercase letter "T.