Hi Craig,

amforth-shell.py does recognize multi-line comments while AmForth does
not. I consider this a feature. Example:

(*
&46 constant PORTE
*)

0 PORTE c!

If you load the above via the shell the PORTE constant won't be created
and PORTE will be subtituted by a number.

If you load the above via a simple terminal emulator the code still
works as the constant PORTE will get created.

Regards, Enoch.


craig and heather <cal...@gmail.com>
writes:

> I know I will probably get flamed for wanting multiline comments but I think
> they are really handy when writing / debugging code.
>
> I thought it would be a trivial exercise to add multiline comments but I
> was wrong.
>
> I tried this code
>
> \ Refill if at end of input line
> : ?refill            ( --- f )
>     source nip >in @ >
>     if
>         true
>     else
>         refill
>     then
> ;
>
> \ Multiline comment ended by *)
> : (*
>     begin
>         parse-name
>         s" *)"
>         icompare
>         0=
>     while
>         ?refill 0=
>         if
>             exit
>         the
>     repeat
> ; immediate
>
> (* This is a comment *) <-- this single line comment works fine
>
> (/*
>
> this is a very long comment over multi lines <-- this multiline command
> does not
>
>  */)
>
> Can anyone tell me what I am doing wrong?
>
>
> Craig Lindley
>
> If you’re one in a million, there are now seven thousand people exactly
> like you.
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to