Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defines not proprocessed in sqf files? #33

Open
kju opened this issue Oct 27, 2016 · 6 comments
Open

Defines not proprocessed in sqf files? #33

kju opened this issue Oct 27, 2016 · 6 comments
Labels

Comments

@kju
Copy link

kju commented Oct 27, 2016

define array //array

array saas_basecache = []; //This variable is uninitialized.

@Ragebone
Copy link

Ragebone commented Oct 28, 2016

sorry, overlooked in like 10 runs that it didn't work, damn unit-testing where you are only able to look at the log. Piece of Shi* Arma.

+1 for the original issue.

Considering that i failed implementing JCPP for basically the same use case, huge respect to Kayler if he manages this.

@kayler-renslow
Copy link
Owner

I'm confused at what you are doing. You are creating a macro "array" but not setting it to anything. Then, you are doing this: array saas_basecache = [];.

@kju
Copy link
Author

kju commented Oct 30, 2016

its "weak" type definition - to make code reading easier/faster to see what type a variable is

@kayler-renslow
Copy link
Owner

so is array converted into whitespace after preprocessing?

@kju
Copy link
Author

kju commented Oct 30, 2016

yep. its a blank replacement
preprocess first removes all comments, then applies the defines/macros
in this case the word will be replaced by nothing - aka the word removed

@kayler-renslow
Copy link
Owner

that's interesting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants