Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!news.luth.se!eru.mt.luth.se!news.kth.se!nac.no!Norway.EU.net!EU.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!lll-winken.llnl.gov!venus.sun.com!male.EBay.Sun.COM!engnews2.Eng.Sun.COM!olm From: olm@Eng.Sun.COM (Ole Lehrmann Madsen) Newsgroups: comp.lang.beta Subject: Re: a few basic questions Date: 29 Apr 1995 17:44:37 GMT Organization: Sun Microsystems Inc., Mountain View, CA Lines: 80 Message-ID: <3nttu5$n8p@engnews2.Eng.Sun.COM> References: NNTP-Posting-Host: det.eng.sun.com X-Newsreader: NN version 6.5.0 #21 (NOV) Thanks for your interest in Beta. Here are some answers: bakul@netcom.com (Bakul Shah) writes: >I have been reading the Beta book (Object-Oriented Programming in >the BETA Programming Language) and have some questions. I looked >though the Beta FAQ and various publicly available on-line >sources but did not find answers to these quesions. >1. Are Beta identifiers case sensitive? no. >2. Are Beta keywords case sensitive? In various sources > I have seen `INNER' as well as `inner' which leads me > to believe may be they are not. no. >3. What characters are allowed in identifiers? More generally, > grammar described in the appendix A of the Beta book does > not give any syntax rules for terminals symbols > such as identifiers and numbers. An indentifier has to start with a letter, and may be followed by a sequence of letters, digits, and '_'. >4. Syntax for the If-imperative does not specify (if E then I if) > as valid but I have seen this syntax used in a number of > examples elsewhere (i.e. not in the Beta book). Which is > right? The (if E then I if) (if E then I else J if) were added as an abbreviation for (if E // true then I if) (if E // true then I else J if) >5. Page 62 shows two forms for labeled imperatives. The second > form ``(L: Imp1; ... :L)'' does not match what is in appendix > A. I suspect appendix A is wrong. Also, what is the `scope' > of a label? For example, is ``(L: (L: 1 :L) :L)'' valid? The 'second' form (L: Imp1; ...; :L) has been removed form the language. Instead the following may be used L: (#do Imp1; .... #) The compiler inlines inserted items that ONLY have a do-part. >6. I am curious about why Beta only allows one dimensional arrays. > Why is > col:(# cell: [columns] @real #); > m1: [rows]@col > preferable to > m1:[rows][columns]@real > ? The argument for this is that basic array mechanism is supposed to be used to build more advanced array abstractions such as two-dimensional arrays. The same is true for the simple for-loop. >I realize that the Beta book is not a formal language reference >so please don't think of the above questions as a criticism of it. >I am simply curious. A language definition manual is currently being written. ---olm >Thanks for any information. >Bakul Shah