- May
- 40
- 0
If I have code such as:
I seem to be getting a failure to always interpret the @char functions!
I thought - that if I have a set variable I can use a single % to indicate it, and optionally I can end it with a surrounding %, such as:
Either is correct, so long as the interpreter can distinguish the end of the variable. If it cannot, the second % is needed to help it out, such as:
Because the whitespace makes it clear that %FristName is ending, no surrounding % is needed in the first example, but it is needed in the second because otherwise it would read:
%FirstNameLastName
Which would not expand properly.
I thought that the same rules apply for %@functions. I thought that this worked for years?
But now I'm finding that %var%%@char[13 10] only sometimes works, and other times fails...
What is the correct rule? Is this a bug in my version of TCC? Or do I just have the rules all wrong?
set message=The %ReleaseTitle% is now official.%@char[13 10 13 10]The master image is located at:%@char[13 10 9]%%ReleasedMediaFolder%%@char[13 10]The source code for this release will be archived to:%@char[13 10 9]%%ArchiveFolder.
I seem to be getting a failure to always interpret the @char functions!
I thought - that if I have a set variable I can use a single % to indicate it, and optionally I can end it with a surrounding %, such as:
%variable
%variable%
%variable%
Either is correct, so long as the interpreter can distinguish the end of the variable. If it cannot, the second % is needed to help it out, such as:
%FirstName %LastName
%FirstName%%LastName%
%FirstName%%LastName%
Because the whitespace makes it clear that %FristName is ending, no surrounding % is needed in the first example, but it is needed in the second because otherwise it would read:
%FirstNameLastName
Which would not expand properly.
I thought that the same rules apply for %@functions. I thought that this worked for years?
But now I'm finding that %var%%@char[13 10] only sometimes works, and other times fails...
What is the correct rule? Is this a bug in my version of TCC? Or do I just have the rules all wrong?