Path: news.daimi.aau.dk!news.uni-c.dk!dkuug!icl.icl.dk!sw0198!seunet!news2.swip.net!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!marie!wpp From: wpp@marie.physik.tu-berlin.de (Kai Petzke) Newsgroups: comp.lang.beta Subject: Re: BETA-Syntax (Pattern variable and component). Date: 25 Sep 95 19:01:00 GMT Organization: Technical University Berlin, Germany Lines: 53 Message-ID: References: <43udur$3cr@fbi-news.Informatik.Uni-Dortmund.DE> NNTP-Posting-Host: marie.physik.tu-berlin.de zardi@margot.informatik.uni-dortmund.de (Ahmed Zardi (LS4)) writes: >1- A pattern variable in BETA has the following syntax. > F : ##P; > where P (: (# ..... #);) is a pattern. > we have a following situation. > T : @P; > A pattern variable assignment has the form > T## -> F## > I ask why has the syntax not the form > T -> F. > (Its known that F is a pattern variable and T is a pattern) Consider the situation: P: (# X: ##Object enter X## do ... #); F: ##P; What should T -> F do in this case? Should it do T##->F##, or should it call the pattern, that F points to, and using T## as an entry parameter to that pattern? You need a distinction. Therefore, one is executed using T##->F##, the other is executed using T##->F >2- A dynamic component in BETA has the following syntax. > A: ^| P; > An instance of P my be generated by executing the > following imperative. > &| P -> A Shouldn't that read: &| P[] -> A[] to create an instance? Well, in cases, that an instance is created and directly assigned to a variable, it is known, which type (Item or Component) is needed. But what in case of the following command: &P Should it create an execute an item of type P, or a component of type P? Both may be meaningfull. Kai -- Kai Petzke, Technical University of Berlin, Germany http://www.physik.tu-berlin.de/~wpp/ to learn about Linux, Postgres and BETA. wpp@marie.physik.tu-berlin.de for regular e-mail How fast can computers get? -- Warp 9, of course, on Star Trek.