Path: news.daimi.aau.dk!news.uni-c.dk!newsfeed.sunet.se!news00.sunet.se!sunic!news99.sunet.se!erinews.ericsson.se!cnn.exu.ericsson.se!newshost.convex.com!news.duke.edu!solaris.cc.vt.edu!news.mathworks.com!news.kei.com!nntp.coast.net!swidir.switch.ch!swsbe6.switch.ch!scsing.switch.ch!news.belwue.de!fu-berlin.de!zrz.TU-Berlin.DE!marie!wpp From: wpp@marie.physik.TU-Berlin.DE (Kai Petzke) Newsgroups: comp.lang.beta Subject: Re: inserted imperatives as enter and exit code Date: 11 Jan 96 17:32:49 GMT Organization: Technical University Berlin, Germany Lines: 31 Message-ID: References: <4d2gbr$qkn@krone.daimi.aau.dk> NNTP-Posting-Host: marie.physik.tu-berlin.de Andrew McVeigh writes: >Hi, >I was browsing through the beta futures implementation the other day >and I noticed the use of inserted patterns in both the enter and exit >parts. I haven't seen this in the OO programming in Beta book, but on >thinking about it, it seems to make a lot of sense and is very powerful. >It works with the beta compiler that I have for linux... How long have >constructs like this been in the language for, and are they considered to >be standard beta: Well, BETA allows you to use an inserted item whereever an expression (or evaluation, to use the strict BETA terms) is expected. As enter and exit parts are just expressions, you may put inserted items into them, too. You may even use inserted items within the declaration of the size of a repetition, as in the following: rep: [(# exit 10 #)] @ integer; This may be convenient to calculate the exact required size of a repetition, when it is generated. 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.