|
|
Hi there,
I am using some file io support to store data to be read later on, but I am
having some troubles. The file the data is read from a file in this format:
<a, b>, <c, d>
<e, f>, <g, h>
<i, j>, <k, l>
....
meaning two uv vectors separated by comma for eac line. The code that has to
be parsed is this:
#fopen a_file "grid.txt" read
//#declare vector1 = <0, 0>;
//#declare vector2 = <0, 0>;
#while(defined(a_file))
#read(a_file, vector1, vector2)
box{
<vector1.x, vector1.y, -.001>, <vector2.x, vector2.y, .001>
}
#undef vector1
#undef vector2
#end
#fclose a_file
the problem arises when parsing the statement in the box clause (the
vectors) The error message is "bad operands for period operator". If the
first two declarative lines are uncommented (as well as the undefs), the
error message reads: "expected 'undeclared identifier', uv vector
identifier found instead."
I thought that "read" worked fine with undeclared identifiers? Someone help
please, this is driving me mad!
Post a reply to this message
|
|