Very Easy FTEQCC Compile Question
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
Very Easy FTEQCC Compile Question
Why doesn't FTEQCC like this?
I get "error: expected ;, found )"
Not a "problem", I just add a space and make it bprint(") "); and the issue goes away, but I'd just like to know why the compiler doesn't like the original above.
bprint(")");
I get "error: expected ;, found )"
Not a "problem", I just add a space and make it bprint(") "); and the issue goes away, but I'd just like to know why the compiler doesn't like the original above.
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Weird! Maybe try:
... and see what that does.
Must be a mistake in the compiler. I would almost expect it to actually be an error in another line (like a " that isn't paired), but since adding a space after the ) fixes it then I doubt that's the case.
Maybe check the fteqcc readme. A ) may be a special character in double-quote strings that's being interpreted to have a special meaning or reference rather than taken literally. Maybe it's expecting a parameter (like a printf with a %i in it) or something after the "" string ends, or the ) is acting like a \ on the ending ", so the string isn't getting terminated or is otherwise weirding out.
- Code: Select all
bprint("\)");
or
bprint(")\
");
... and see what that does.
Must be a mistake in the compiler. I would almost expect it to actually be an error in another line (like a " that isn't paired), but since adding a space after the ) fixes it then I doubt that's the case.
Maybe check the fteqcc readme. A ) may be a special character in double-quote strings that's being interpreted to have a special meaning or reference rather than taken literally. Maybe it's expecting a parameter (like a printf with a %i in it) or something after the "" string ends, or the ) is acting like a \ on the ending ", so the string isn't getting terminated or is otherwise weirding out.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
Strange...
) isn't a special character at all for strings (other than that it'll terminate a #MACRO name inside a string).
I'll need to look into this some time...
Everything else compiles and runs fine, I assume, just with the extra space?
) isn't a special character at all for strings (other than that it'll terminate a #MACRO name inside a string).
I'll need to look into this some time...
Everything else compiles and runs fine, I assume, just with the extra space?
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Spike wrote:Strange...
) isn't a special character at all for strings (other than that it'll terminate a #MACRO name inside a string).
I'll need to look into this some time...
Everything else compiles and runs fine, I assume, just with the extra space?
Yeah, everything else compiles fine and it runs fine if I add the extra space.
I may not be using the current build of FTEQCC, I will download current version, test again and see what happens sometime later today.
I am playing around with Paraboil Frogbot stuff and it has numerous #IFDEFs in it, btw, so it could have something to do with that.
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
I solved this bug before in FrikQCC, it's a QCC bug iirc, and the cause is that ")" passes the PR_Check for the end of the function call regardless of the fact it is flagged as a string token type and not a punctuation token type. There's a bunch of ways to solve it. I forgot which one I chose.
- FrikaC
- Site Admin
- Posts: 1026
- Joined: Fri Oct 08, 2004 11:19 pm
Yup FrikaC is quite correct with that solution. Thanks, you just made my life that little bit easier.
In the mean time, just make a global string closebracket=")"; :D
I'd commit it but I'm lazy, and have a few other tweeks in there which will cause all sorts of similar obscure errors.
In the mean time, just make a global string closebracket=")"; :D
I'd commit it but I'm lazy, and have a few other tweeks in there which will cause all sorts of similar obscure errors.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Spike wrote:Yup FrikaC is quite correct with that solution. Thanks, you just made my life that little bit easier.
In the mean time, just make a global string closebracket=")";
I'd commit it but I'm lazy, and have a few other tweeks in there which will cause all sorts of similar obscure errors.
I wasn't using the current version of fteqcc and this problem doesn't occur in the current version of fteqcc.
So I guess that's that.
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
Hrm? that problem should appear in the current svn version.
And if it doesn't then I don't know why it works. :)
I'll commit a fix once I properly get around to testing variable initialisers on locals... and support for #if defined(a) || defined(b)... and figure out what LH wants to do with a possible -TDP option.
And if it doesn't then I don't know why it works. :)
I'll commit a fix once I properly get around to testing variable initialisers on locals... and support for #if defined(a) || defined(b)... and figure out what LH wants to do with a possible -TDP option.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest