However, my Basic interpreter doesn't compile with 7.0.0 The error reported is
ffunicode.c:15565: error: bad cast of cvt1
?????
FlexBasic also accepts recv. So I prepared getchar() function that waits for a keypress and returns an ASCII code.
Then this "program" in bf:
+[,.]
prints on the screen a character that was pressed.
@pik33 said: However, my Basic interpreter doesn't compile with 7.0.0 The error reported is ffunicode.c:15565: error: bad cast of cvt1 ?????
@pik33 said: However, my Basic interpreter doesn't compile with 7.0.0 The error reported is
I edited the line 15565 of ffunicode.c to
p = uc < 0x1000 ? (WORD*) cvt1 : (WORD *) cvt2;
Now it compiles. However I don't know if this is a proper way to correct this and why the C compiler cannot do the assign without a manual added cast.
Aargh, that's a new bug in the ?: parsing code. It's fixed in github now, but your work-around of adding explicit casts is a good one.
@ersmith Can you do muldiv64 in C? Not seeing it... Maybe need to include a helper.spin2 type object in C to get that?
@Rayman said: @ersmith Can you do muldiv64 in C? Not seeing it... Maybe need to include a helper.spin2 type object in C to get that?
unsigned _muldiv64(unsigned m1, unsigned m2, unsigned d);
It doesn't seem to be documented, I need to update the docs.
Comments
However, my Basic interpreter doesn't compile with 7.0.0 The error reported is
ffunicode.c:15565: error: bad cast of cvt1
?????
FlexBasic also accepts recv. So I prepared getchar() function that waits for a keypress and returns an ASCII code.
Then this "program" in bf:
+[,.]
prints on the screen a character that was pressed.
I edited the line 15565 of ffunicode.c to
p = uc < 0x1000 ? (WORD*) cvt1 : (WORD *) cvt2;
Now it compiles. However I don't know if this is a proper way to correct this and why the C compiler cannot do the assign without a manual added cast.
Aargh, that's a new bug in the ?: parsing code. It's fixed in github now, but your work-around of adding explicit casts is a good one.
@ersmith Can you do muldiv64 in C? Not seeing it... Maybe need to include a helper.spin2 type object in C to get that?
It doesn't seem to be documented, I need to update the docs.