Re: What has happened to comity
----- Original Message -----
From: "Everett Williams" <rett at GVTC.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Wednesday, February 14, 2001 3:39 PM
I support the syntax
include filename.e as abc
I do not support the syntax
external_global_prefix = "abc"
for the reasons that Everett clearly explained.
I also support these ideas...
a) a file can be included anywhere in the source text, not just at the file
level.
b) an included file will only be ignored if it is included again in the
same namespace and with the same "as" clause.
The use of these is to support code like this ....
function CloneCustomer( sequence custId)
include custofs.e
include custrec.e as current
include custrec.e as new
new.CustRec = EmptyCustRec
current.CustRec = fetchCustomer(custId)
if current.CustRec[Status] = kActive then
new.CustRec[Name] = current.CustRec[Name]
new.CustRec[Address] = current.CustRec[Address]
new.CustRec[PostalCode] = current.CustRec[PostalCode]
current.CustRec[WasCloned] = True
updateCustomer( custId, current.CustRec)
else
current.CustRec = fetchCustomer(kTemplateId)
new.CustRec[Name] = current.CustRec[Name]
new.CustRec[Address] = current.CustRec[Address]
new.CustRec[PostalCode] = current.CustRec[PostalCode]
end if
new.CustRec[CreateDate] = Today()
new.CustRec[CreateTime] = Now()
return new.CustRec
end function
where "custrec.e" is ...
global sequence CustRec
global sequence CustAltIndex
where "custofs.e" is ...
global constant Name = 1,
Address = 2,
PostalCode = 3,
WasCloned = 4,
Status = 5,
CreateDate = 6,
CreateTime = 7,
EmptyCustRec = {"", "", 0, 0, kNewRecord, 0, 0}
though even better would be an "export" clause rather than "global", that
only exposed the identifiers to the namespace that the include file was in.
------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)
|
Not Categorized, Please Help
|
|