Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not so much a bug, as slow!
#14
einar Wrote:
  • Change the ZX BASIC builder so it will only include the FP library if the program really uses FP somehow;

  • To avoid INT(RND * n) from forcing the builder to include the FP library (and probably also to optimize compiled code), change RND to accept an optional parameter, such that using RND(n) will return an UINTEGER value between 0 and n-1, and just using RND without parameters will return a FLOAT value as before. Alternatively, if this dual behavior would be a problem for the parser, then provide instead a new function INTRND(n) that works as I described here.

Makes sense?
It does! Wink
ZX Basic already does that. Not only it does not include any FP library if not used, but only includes the minimum code for the required functions (there is some #include and #require in the .asm libraries for that). When using a FP library not in ROM, the same will be done, but now the FP functions will take much more RAM (e.g. SIN, COS, etc).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)