🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.amiga
Article #571

Re: Arexx again

#571
From: Neil Bothwick
Date: Sat, 12 Jun 1999 00:00
44 lines
2097 bytes
Terrance Richard Boyes said, 

> Neil Bothwick <postmaster@wirenet.co.uk> wrote:

>> The other way to do it is to use environment variables, but you have
>> to use an extra library to use those easily in arexx. So clips are

> err=open(envio,'ENV:'var,'R')

> Would do the job since local env vars aren't suitable in this case
> anyway :)

That opens the file, but doesn't take care of checking for its
existence in the first place, reading the contents or closing the
file. you end up with something like

GetVar:
	if ~exists('ENV:'var) then return ''
	if ~open(envio,'ENV:'var,'R') then return ''
	var = readln(envio)
	call close(envio)
	return var


> Though using the function libraries is nicer...

Much!

>> easier, although they use slightly more memory. The other thing to
>> watch for with get/setclip is that the clip name is case-sensitive.

> And the memory isn't released unless you do so explicitly,
> of course that's only really important if you use a lot, but
> again it's nicer to do so...

The same applies to environment variables, unless you unsetenv the
file remains in ENV:


Neil
-- 
Neil Bothwick, Warrington, England - http://www.wirenet.co.uk

UNILINGUAL: American.
Technical Details
Message-ID: <1292.832T2408T6364462neil@wirenet.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <b1.m0.I22sID1aki45uDP55.NR@bh01.demon.co.uk> <1607.830T1531T14163821neil@wirenet.co.uk> <M1.J1.J22tJbeWZA45Suy45.NR@bh01.demon.co.uk> <1608.831T1963T14054257neil@wirenet.co.uk> <19990611.232017.0AA80202.deaa@pierrot.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1160fd,4a7c0a01d4d2526
X-Google-Attributes: gid1160fd,public
From: "Neil Bothwick" <postmaster@wirenet.co.uk>
Subject: Re: Arexx again
Date: 1999/06/12
Message-ID: <1292.832T2408T6364462neil@wirenet.co.uk>
X-Deja-AN: 488878260
References: <b1.m0.I22sID1aki45uDP55.NR@bh01.demon.co.uk> <1607.830T1531T14163821neil@wirenet.co.uk> <M1.J1.J22tJbeWZA45Suy45.NR@bh01.demon.co.uk> <1608.831T1963T14054257neil@wirenet.co.uk> <19990611.232017.0AA80202.deaa@pierrot.co.uk>
X-Complaints-To: news@u-net.net
X-Info: The UK's first Amiga-only Internet Access Provider  
X-Trace: newsr2.u-net.net 929219537 194.119.174.218 (Sat, 12 Jun 1999 21:32:17 BST)
X-Real-Host: jverarg.h-arg.pbz
Organization: Wirenet Amiga Internet
NNTP-Posting-Date: Sat, 12 Jun 1999 21:32:17 BST
Newsgroups: demon.tech.amiga