Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A string bug in 1.2.8-s682 (*solved*)
#8
Okay: The bug seems to be (finally!) fixed. It's been a very tough one :x
It happened when ADDing initialized (NULL) strings (if you had initalized Char$ = "" in your function the bug). NULL (uninitialized) strings are allowed by the compiler and managed as empty ones. :roll: So:
Code:
A$ = A$ + "5"
PRINT A$
Should print just 5. The problem was the STRADD routine had a bug for this case. :roll: Now fixed.

Also, #include <alloc.bas> had a bug of bad included (also fixed), and now contains 2 new important functions:
  • Memavail() .- Returns the total available (and maybe fragmented) free Heap Memory. Notice that if there are 1Kb of free memory it can be a single contiguous block or, for example, 4 chunks of 256 bytes (in such case you can only get at most 256 bytes when calling allocate() ).
  • MaxAvail() .- Returns the size (in bytes) of the largest continuous available/free memory block in the Heap. Calling Allocate(N) with N greater than the value returned by this function will result in a memory error (NULL returned or Out Of Memory error if --check-memory is enabled).
Please, download 1.2.8s696 here, test your program and tell me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)