2 ;;Quote: Merlin is for the convenient development and clear expression of algorithms, not efficiency
|
QuoteRef: hehnEC7_1975 ;;6 ordered or unordered literal values named by listing eg red, blue, green: v
|
QuoteRef: hehnEC7_1975 ;;8 sequences by a by b to c or A to C
|
QuoteRef: hehnEC7_1975 ;;9 unordered sets by braces around a sequence of values
|
9 ;;Quote: in Merlin, records by a list of elements with specified indices; a sequence or array uses numbers for indices
|
QuoteRef: hehnEC7_1975 ;;10 "abc" is 1:(a) 2:(b) 3:© where (character literal)
|
QuoteRef: hehnEC7_1975 ;;12 all kinds of set and list operations, standards plus various mapping operations
|
QuoteRef: hehnEC7_1975 ;;15 allows literals such as j: 2*i+1
|
QuoteRef: hehnEC7_1975 ;;16 variable is literal [another literal, j: 2*i+1] with type value e.g., name: var in sectorlist
|
QuoteRef: hehnEC7_1975 ;;20 assignment by name .larrow. value where type matches
|
QuoteRef: hehnEC7_1975 ;;21 increment by i <- #+1
|
QuoteRef: hehnEC7_1975 ;;21 standard control functions eg for name in sectorlist
|
QuoteRef: hehnEC7_1975 ;;28 writes example programs very much like language programs [MERLIN]
|
QuoteRef: hehnEC7_1975 ;;28 reference to a labeled statement means do that statement
|
QuoteRef: hehnEC7_1975 ;;39 defining a random variable also defines the variable to implement that random (so don't need a global variable)
|
QuoteRef: hehnEC7_1975 ;;39 random number generator: random: module seed: par in rationals; export variable, generate; seed: ...(this is default value);variable: var in rationals; variable<- seed (initializing code); generate: ...(changes variable) .box. then can say r: random [seed:123] (overrides default seed) and use a locally known variable r.variable ...
|
QuoteRef: hehnEC7_1975 ;;41 module definition eg complex-stack: stack (entries: complex .circlePlus. numbers) c: var in complex .circlePlus. numbers complex-stack .circlePlus. push (entry:c)
|
41 ;;Quote: modules export names while routines import them
|
QuoteRef: hehnEC7_1975 ;;41 definition of a module defines a set of complex names
|
42 ;;Quote: a function is an abstraction of a value that is instantiated on execution
|
42 ;;Quote: a routine is an abstraction of assignment since its execution changes the values of variables
|
42 ;;Quote: a type module is an abstraction of naming; its execution introduces new names
|
QuoteRef: hehnEC7_1975 ;;45 lots of key words, straightforward pattern matching merlin
|
QuoteRef: hehnEC7_1975 ;;58 "a variable stands for a value"
|
58 ;;Quote: a constant is a permanent name for a value; a variable is a temporary name
|
60 ;;Quote: while some operators apply to many types, others apply to restricted types, e.g., division
|
60 ;;Quote: Merlin defines data type as a set of values
|
61 ;;Quote: a name corresponds to the initial value of possible changes to a variable
|
QuoteRef: hehnEC7_1975 ;;63 L[5]<- 8 means L<-# replace 5 by 8 i.e. L[5] now stands for a different value
|