Re: newcomer problem

new topic     » goto parent     » topic index » view thread      » older message » newer message

Franco Marangoni wrote:

> To all Euphoria enthusiasts:
> I have a multi-dimensional array, array[x][y].
> This array is now little, but could grow up to some Mbyte.
> During debug, when I want to know the content of a cell (example:
> array[370][41]), the answer is: "NOT DEFINED AT THIS POINT".  I can see only the
> first elements in the array by typing "array".
> Is there a solution to overcome this?

If you want to see the contents only at certain points, you can put in a print
  statement:
  ? array[370][41]

A better (neater) way is to display the item each time there is an assignment
  to it:
This is easy using the Euphoria "type", as there is only 1 line of code to
 change when
you are finished debugging (instead of numerous "print" statements scatterd
  thru your
  program!)

   I use:
   type debug_array (object x)
position(1,1) puts(1,'                        ') -- blank out previous
        contents
position(1,1) ? x[370][41]                     -- show the area in
        question
-- you could insert a pause or delay here if things are changing much too
   fast.
      return 1
    end type

 now, define your array as:
    debug_array my_array
rather than
    sequence array

change it back to
    sequence array
 when you're finished debugging.

Regards,
Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu