Search the web
Sign In
New User? Sign Up
KR-language
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
method argument names   Message List  
Reply | Forward Message #278 of 712 |
Although I designed MKR to use numbered arguments
to be consistent with the UNIX shell, I implemented
MKE in a way that actually permits you to use
named arguments.

Thus your subtract method
subtract iss method with
# Product = $1 - $2
format=[number:1,number:2],
local=[count,difference],
meaning={
set echo=off;
set count = 1;
difference := do decrease od $1 done;
until $count is $2 {
count := do increase od $count done;
difference := do decrease od $difference done;
};
set echo=on;
set Product = $difference;
};


can be written as
subtract iss method with
# Product = $subtrahend - $minuend
format=[number:subtrahend,number:minuend],
local=[count,difference],
meaning={
set echo=off;
set count = 1;
difference := do decrease od $subtrahend done;
until $count is $minuend {
count := do increase od $count done;
difference := do decrease od $difference done;
};
set echo=on;
set Product = $difference;
};


MKR also permits variable length argument lists.
For example:
add is method with
format=[number:*],
meaning={
# use MKE built-in method
do sum od $* done;
};

Dick McCullough
knowledge := man do identify od existent done;
knowledge haspart proposition list;
http://rhm.cdepot.net/




Mon Aug 1, 2005 3:35 pm

rhmcc
Offline Offline
Send Email Send Email

Forward
Message #278 of 712 |
Expand Messages Author Sort by Date

Although I designed MKR to use numbered arguments to be consistent with the UNIX shell, I implemented MKE in a way that actually permits you to use named...
Richard H. McCullough
rhmcc
Offline Send Email
Aug 1, 2005
3:37 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help