Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth Mac > Re: RfD - Enhan...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 25 Topic 123 of 161
Post > Topic >>

Re: RfD - Enhanced local variable syntax (long)

by Andreas Kochenburger <akk@[EMAIL PROTECTED] > Aug 21, 2006 at 09:03 AM

On Sun, 20 Aug 2006 20:53:03 GMT, stephenXXX@[EMAIL PROTECTED]
 (Stephen
Pelc) wrote:
>The following syntax for local arguments and local variables is
>proposed. The sequence:
>  { ni1 ni2 ... | lv1 lv2 ... -- o1 o2 }
>defines local arguments, local variables, and outputs. The local
>arguments are automatically initialised from the data stack on
>entry, the rightmost being taken from the top of the data stack.
>Local arguments and local variables can be referenced by name within
>the word during compilation. The output names are dummies to allow
>a complete stack comment to be generated.
>  The items between { and | are local arguments.
>  The items between | and -- are local variables or buffers.
>  The items between -- and } are outputs.

Some Forths use curly braces for multiline comments. instead of the
ugly 0 [IF]
I am comfortable with L( ... ) for defining locals. Also it resembles
the stack annotation. And as other posted, braces are hard to read.

I see problems with output locals. In my previous experiments I
noticed that they were seldom of practical use. 
: TEST  L( a -- o1 o2 )
  a to o1
  1
  a 2 + to o2 ;
0 TEST
Will the output be 1 0 2 or 0 2 1 ?

 
Andreas
-------
A computer is like an old Greek god, with a lot of rules and no mercy.
 




 25 Posts in Topic:
RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-20 20:53:03 
Re: RfD - Enhanced local variable syntax (long)
transfire@[EMAIL PROTECTE  2006-08-20 14:32:47 
Re: RfD - Enhanced local variable syntax (long)
Andreas Kochenburger <  2006-08-21 09:03:46 
Re: RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-21 11:14:20 
Re: RfD - Enhanced local variable syntax (long)
Andreas Kochenburger <  2006-08-22 08:48:21 
Re: RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-22 09:07:26 
Re: RfD - Enhanced local variable syntax (long)
"dbu" <dirk@  2006-08-21 01:21:46 
Re: RfD - Enhanced local variable syntax (long)
"Alex McDonald"  2006-08-21 01:28:44 
Re: RfD - Enhanced local variable syntax (long)
"GerryJ" <ge  2006-08-21 06:24:38 
Re: RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-21 14:20:55 
Re: RfD - Enhanced local variable syntax (long)
Coos Haak <chforth@[EM  2006-08-21 19:30:43 
Re: RfD - Enhanced local variable syntax (long)
"jacko" <jac  2006-08-21 07:58:59 
Re: RfD - Enhanced local variable syntax (long)
"GerryJ" <ge  2006-08-21 14:45:13 
Re: RfD - Enhanced local variable syntax (long)
"Alex McDonald"  2006-08-21 16:04:53 
Re: RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-22 09:42:48 
Re: RfD - Enhanced local variable syntax (long)
anton@[EMAIL PROTECTED]   2006-08-23 20:35:55 
Re: RfD - Enhanced local variable syntax (long)
Andreas Kochenburger <  2006-08-22 12:21:17 
Re: RfD - Enhanced local variable syntax (long)
Bernd Paysan <bernd.pa  2006-08-20 23:31:42 
Re: RfD - Enhanced local variable syntax (long)
"Alex McDonald"  2006-08-22 05:36:37 
Re: RfD - Enhanced local variable syntax (long)
"J Thomas" <  2006-08-22 06:26:48 
Re: RfD - Enhanced local variable syntax (long)
anton@[EMAIL PROTECTED]   2006-08-23 20:48:39 
Re: RfD - Enhanced local variable syntax (long)
anton@[EMAIL PROTECTED]   2006-08-23 20:58:22 
Re: RfD - Enhanced local variable syntax (long)
"Doug Hoffman"   2006-08-23 17:16:41 
Re: RfD - Enhanced local variable syntax (long)
stephenXXX@[EMAIL PROTECT  2006-08-24 10:44:12 
Re: RfD - Enhanced local variable syntax (long)
dhoffman@[EMAIL PROTECTED  2006-08-25 03:06:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:11:20 CST 2008.