Hi! "[EMAIL PROTECTED]" wrote:
> Hi all, I have a problem: > > I wish to interrupt a program when it is running, using something like: > > print "DEBUG: " > ask > You got to be careful here because 'ask takes an argument, and it will snatch one from the next line if it has to. > > At this point, I want to analyze the variables used by my software, > example: > > DEBUG: print myVar Now 'print is one of the few functions in rebol that does not return a value, so the above line will cause an error. The functions you really want to use for debugging are '?? and 'probe. They both return their argument, so they are easy to just insert into most places. '?? is a little dum with anything except simple words, so dont use it with anything that has a "/" or a ":" in it. > > > where myVar is a variable previously defined in the software. But... > Rebol tell me the variable does not exist! I think because this break > (instruction "ask") create a new context, different from the one used > by the program while it is running. What can I do to evaluate the > instructions inserted in the "ask" block? > > Thanks! > My guess is that the original assignment of MyVar is not being evaluated. Check that this is actually occuring with a 'probe, like so: probe MyVar: "Im evaluated!" Contexts should'nt bother you too much unless you play with to-string, context, or make object!. Enjoy! --Ryan > > -- > Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f > > Sponsor: > Ti � capitato di cercare un libro e non riuscire a trovarlo? > E' attivo il servizio TrovaLibri di Airbook.it > > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=345&d=13-3 > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. -- Note: When sending me email directly, always make sure to include my name in the message, otherwise my aggressive spam filters may trash it. Ryan Cole * www.iesco-dms.com * 707-468-5400 -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
