Lonely Hearts - the procedures

Definitions and comments

With the general workings of the system clear let us now look at the definitions of the procedures making up the environment.

It is assumed that pickrandom, defined as you know how, is already in the workspace or will be added. The remaining procedures are arranged below in an order which should help to make a straight read through reasonably intelligible. <tab>> is used to indicate run-on lines. In a few cases comments or explanations are included within the procedure body. These comments are found in lines beginning with a semi-colon which - in most implementations - acts as a signal to the interpreter to ignore everything else on the same line. (For the purposes of this section they are also presented in italics.)

to lonely
  op ( se someone "seeks someone why how ) 

to someone
  op ( se description type age ) 

to description
  op pickrandom   <tab>
     [successful retired fanatical handsome sympathetic <tab> 
        intelligent  [blue eyed]  tory <tab>
             [smartly dressed] athletic] 

to type
  op pickrandom <tab>
    [tycoon  [dandy and beano fan]  widow  m.p. <tab> 
       [bus driver] [shorthand typist] schoolboy  <tab>
            [farm owner] .entertainer  [boy scout]]

to age
;outputs a list composed of any one of 80 numbers 
 ;starting at and INCLUDING 8 ( i.e. between 8 and 87)
;followed by the word 'years'
  op se 8 + random 80 "years 

to why
  op se "for activity 

to activity
  op pickrandom <tab>
      [ [camping companion] [help with homework] <tab>
          [driving lessons]  [dictation practice] <tab>
              [swapping jokes] [weekend walks] <tab>
                 [whist partner] [magician's assistant] <tab>
                    [business venture] [company only] <tab>
                         [summer haymaking] ] 

to how
  op ( se phone number when ) 

to phone
;packages together in a list two random choices 
;(from two different lists)

  op se pickrandom [ [please] [ ] ] <tab>
      pickrandom [ring call phone telephone dial]  

to number
  op ( se two two two ) 

to two
;for a  number to be two digits long 
;it must be somewhere between 10 and 99
op 10 + random 90 

to when
  op pickrandom <tab>
      [anytime [evenings after 10] [office hours] <tab> 
        [straight away] [before 8 or after 6]]

Logo-ready definitions and some things to do

Click here for a page containing the definitions which you can copy and paste into your Logo editor (or which you can save and later load into Logo). For some things to do with Lonely Hearts, try here.

Ron Brasington
Department of Linguistic Science
The University of Reading

E-mail: ron.brasington@rdg.ac.uk