Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language High Level Petri Net

(Extended PEP Format for PNModel)

Date:11/20/05
Author:Tim Strazny
URL:http://www.p-umlaut.de
Comments:1
Info:http://parsys.informatik.uni-oldenburg.de/~pep/
Score: (2.60 in 15 votes)
F
txt(i) = ifthen(i#0, i, \"no\") + \" bottle\" + ifthen(i#1, \"s\", \"\") + \
\" of beer\"

PL
1 "count" y"{99}" *

TR
1 "loop" g"count#0 & next=count-1 & write(txt(count), \" on the wall, \", \
txt(count), \".\nTake one down and pass it around, \", txt(next), \" on the \
wall.\n\n\")"

2 "break" g"write(\"No more bottles of beer on the wall, no more bottles of \
beer.\nGo to the store and by some more, 99 bottles of beer on the wall.\n\")"

PT
1>1 p"count"
1>2 p"0"

TP
1<1 p"next"

Download Source | Write Comment

Alternative Versions

Comments

>>  Tim Strazny said on 04/13/06 11:45:55

Tim Strazny Minor correction:
Since the format for user defined functions changed, the first line should be "FN" instead of "F".

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: