how can I read last line, or last nn bytes from a file?

nnCron and nnCron LITE discussion

Postby LuckMan212 » Sun, 02 Jul 2006, 18:42

so what do you think could be wrong? is it a conflict with a nnCron plugin? I dont see why it would work for you but suddenly it stops working for me. :cry:
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby Nicholas_Nemtsev » Sun, 02 Jul 2006, 19:49

I think, that it is necessary to add more output of the debugging information. Print a state of the stack (.S) after each operation and then it becomes clear where a mistake.
Nicholas Nemtsev
User avatar
Nicholas_Nemtsev
Site Admin
 
Posts: 857
Joined: Thu, 01 Jul 2004, 22:25
Location: Псков

Postby LuckMan212 » Tue, 04 Jul 2006, 00:35

is this the easiest way to print stack from inside a task? :

Code: Select all
.S MsgBox
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby Nicholas_Nemtsev » Tue, 04 Jul 2006, 09:18

I have written STACK-STRING for this purpose.
Code: Select all
#( stack-show
NoActive
: STACK-STRING { \ buf -- a u}
   1024 ALLOCATE THROW TO buf buf 0!
   DEPTH 32 MIN 0 ?DO I 1+ CELLS SP@ + @ N>S buf +ZPLACE S"  " buf +ZPLACE LOOP
   buf ASCIIZ> EVAL-SUBST
   buf FREE DROP
;
Action:
    1 2 3 4 5
    STACK-STRING MsgBox
    2DROP 2DROP DROP
)#
Nicholas Nemtsev
User avatar
Nicholas_Nemtsev
Site Admin
 
Posts: 857
Joined: Thu, 01 Jul 2004, 22:25
Location: Псков

Postby LuckMan212 » Wed, 05 Jul 2006, 00:50

ok I will do more testing and get back to you.
thank you.
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Previous

Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest