I'm accustomed to using the #include pre-processor in my vex wrangles for my own functions stored in external files.
I don't have issues with using #include for those functions; It works fine.
However, when I simply want to insert a ‘block’ of code using #include that is accessing that block of code from a file, it complains with error messages.
Depending on the block of code the error( fail to cook, vex and during comile errors) always refers to some punctuator of the code in the external file with something like:
Syntax error, unexpected ',', expecting '('. (1,9).The code which is in the external file(Code_Insert.h) is :
vector A, B, C;
A = set(0,0,0);
B = set(2,0,0);
C = set(3,1,0);
addpoint(geoself(), A);
addpoint(geoself(), B);
addpoint(geoself(), C);
The line in vex used to access that file is the typical way I use #include for my functions as:
#include <C:\Users\Me\Documents\Houdini Bug Reports\H16\Code_Insert.h>
I've tried just using quotes instead of <>, but no difference.
The above code is just a simplified example which duplicates what I was experiencing in my original file.
From the docs:
…
#include “filename”
Inserts the contents of the file at this point in the source code. When you use quotes, the directory containing the current file is searched for filename before the standard locations (including the path).
…
Base on this doc description I was assuming my block of code would be inserted in the wrangle where I have the #include statement, but the error messages say otherwise.
Anyone know what I may be mis-understanding or doing wrong?
Thanks

