Language Uniface
(4 GL language from Compuware)
| Date: | 11/07/05 |
| Author: | Thomas Bieligk |
| URL: | n/a |
| Comments: | 0 |
| Info: | http://www.compuware.com/products/uniface/3790_ENG_HTML.htm |
| Score: |
; 99 bottles of beer, using Uniface 7
; Uniface is a 4GL development environment from Compuware
;
; Technical Info:
; Only the <EXEC>-Trigger is shown.
; One Non-Database/Non-modell entity "roundofbeer"
; with one editbox "msg" (Interface C80 / Syntax NED,NPR) painted.
;
variables
numeric numberOfBottles
endvariables
numberOfBottles = 99
repeat
call take_bottle(numberOfBottles)
numberOfBottles = numberOfBottles - 1
until (numberOfBottles < 0)
setocc "roundofbeer", 1 ; Go to top.
display ; Display result on screen.
; ---------------------------------------------------------------------
entry take_bottle
params
numeric bottles: IN
endparams
variables
string line
endvariables
selectcase (bottles)
case 0
line = "No more bottles can be found."
case 1
line = "One bottle of beer on the wall. Take it down, pass it around."
elsecase
line = "%%bottles%%% bottles of beer on the wall. Take one down, pass it around."
endselectcase
if (! $empty(roundofbeer)) creocc "roundofbeer", -1 ; Create new line
msg.roundofbeer = line
end; take_bottle
Download Source | Write Comment
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!
Comments