(Program Description Language)
|Info:||Open University (probably no longer in use)|
|Score:||(2.00 in 3 votes)|
Programming Description Language (PDL) is NOT a compilable script. It was a step-like plain-English script taught by the Open University in its 'Fundamentals of Computing' (M205) course some 22 years ago. The level of detail can be as low or high as appropriate for the student's understanding. For example, the simplest might be: 1 declare and initialise variables 2 loop 100 times and output message based on loop count The above can be elaborated, note the numbering and indentation: 1.1 declare bottle number variable (bnv) 1.2 declare loop count variable (lcv) 1.3 initialise lcv to zero 2.1 start FOR control loop for 100 iterations 2.2 set bnv to 99 - lcv 2.2.1 start CASE statement structure 188.8.131.52 CASE bnv more than 2 184.108.40.206.1 output "[bnv] bottles of beer on the wall, " 220.127.116.11.2 output "[bnv] bottles of beer." 18.104.22.168.3 output Carriage Return 22.214.171.124.4 output "Take one down and pass it around, " 126.96.36.199.5 output "[bnv-1] bottles of beer on the wall." 188.8.131.52.6 output Carriage Return 184.108.40.206.7 output Carriage Return 220.127.116.11 CASE bnv equals 2 18.104.22.168.1 output "2 bottles of beer on the wall, " 22.214.171.124.2 output "2 bottles of beer." 126.96.36.199.3 output Carriage Return 188.8.131.52.4 output "Take one down and pass it around, " 184.108.40.206.5 output "1 bottle of beer on the wall." 220.127.116.11.6 output Carriage Return 18.104.22.168.7 output Carriage Return 22.214.171.124. CASE bnv equals 1 126.96.36.199.1 output "1 bottle of beer on the wall, " 188.8.131.52.2 output "1 bottle of beer." 184.108.40.206.3 output Carriage Return 220.127.116.11.4 output "Take one down and pass it around, " 18.104.22.168.5 output "no more bottles of beer on the wall." 22.214.171.124.6 output Carriage Return 126.96.36.199.7 output Carriage Return 188.8.131.52 CASE bnv = 0 (or OTHERWISE) 184.108.40.206.1 output "No more bottles of beer on the wall, " 220.127.116.11.2 output "no more bottles of beer." 18.104.22.168.3 output Carriage Return 22.214.171.124.4 output "Go to the store and buy some more, " 126.96.36.199.5 output "99 bottles of beer on the wall." 2.2.3 end CASE statement structure 2.3 set lcv to lcv + 1 2.4 end FOR control loop The further the refinement, the nearer it looks like a "real" programming language and the above could be transliterated into high-level code without too much amendment. The idea of the above is to equip those without specific coding skills to develop logic without knowing yet what the specific syntax has to be. The niceties of HOW to output the data is not something the student has to grapple with straight away, nor the fact that "commenting- out" of notes such as these would be necessary too! Note the introduction to the concepts of variables and keywords, such as FOR and CASE. It is not a huge leap from the above to introduce the WHILE loop as an alternative on lines 2.1-2.4 . A transliteration of the above, using a WHILE loop, will be submitted in Paradox Application Language (PAL) shortly. It is loosely based on Pascal and is the coding language of Borland's Paradox® Relational Database. This PAL should not be confused with the Prodigy Application Language example already listed.
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!