Alexander Burger <[email protected]> writes:
Hi Alex,
> Yes. 'println' prints one or more expressions and a newline, without any
> further formatting. So if you 'read' an expression like
>
> (a
> (b
> (c d
> (e f) ) ) )
>
> it will be printed as
>
> (a (b (c d (e f))))
I see, thanks, so in theory this should work too with other Lisps that
have a function equivalent to 'println'.
>> ,------------------------------------------------
>> | (rel exp (+Class1 +Class2 ...) {xxx} (+Class3))
>> `------------------------------------------------
>>
>> My real question was what can happen in the {xxx} part above (just from
>> the point of view of parsing the section with regexp:
>>
>> - {empty}
>> - NIL
>> - sym
>> - (list) sym
>> - ... ?
>
> Yes depending on the class(es) in the relation type (the first list). It
> may also be a number (e.g. for '+Number' (an optional scale) or '+Snx'
> (the minimum string length)).
>
> '+Link' takes a type (a list of classes), while '+Joint' as an extension
> to '+Link' takes an additional symbol (the slot in the "opposite"
> object).
Ok, then I have seen all possibilities except the 'number'.
> If you just see
>
> (rel ord (+Joint) pos (+Ord))
>
> it may be a 1-to-1 or a 1-to-N, depending on the opposite side.
>
> Note that also
>
> (class +Cls1 +Entity)
> (rel var1 (+List +Joint) var2 (+Cls2))
> ...
> (class +Cls2 +Entity)
> (rel var2 (+List +Joint) var1 (+Cls1))
>
> is possible, describing a N-to-N relation.
So I need to remember the +Cls1 info in case there is a +Joint until the
parser reaches +Cls2.
>> >> ,-----------------------------------
>> >> | (rel pos (+List +Bag) # Positions
>> >> | ((+Ref +Link) NIL (+Item)) # Item
>> >> | ((+Number) 2) # Price
>> >> | ((+Number)) # Quantity
>> >> | ((+String)) # Memo text
>> >> | ((+Number) 2) ) # Total amount
>> >> `-----------------------------------
>>
>> I think I'll have to figure out a trick how to deal with bags, way to
>> much effort to get all this info into an UML diagram.
>
> Perhaps (+List +Bag) can be seen as an object-local "table"?
that would work, since tables are presented in class-boxes in UML.
>> BTW, one more question:
>>
>> The vars sometimes specified in the comment beyond a class definition:
>>
>> ,-----------------
>> | (class ...
>> | # var1 var2 var3
>> | ...)
>> `-----------------
>>
>> can be considered as a kind of 'private instance (or class) variables?
>
> Yes. I would not use "private" here, as it sounds like information
> hiding, which is not the case.
>
> "Instance variables" fits best. BTW, there are also "class variables"
> (http://software-lab.de/doc/refV.html#var).
Ok, thanks for the tips.
--
cheers,
Thorsten
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe