[Gambas-user] Changes in LINK

Christopher Brian Jack brian at ...1334...
Sat Oct 28 21:41:26 CEST 2006


On Sat, 28 Oct 2006, Rob wrote:

Could the AS keyword be used in the inverted form?

eg:
LINK <source> AS <destination>

Or does the AS keyword have some internal management that requires it to
be paired with datatypes or class names (hence it could only be used as a
keyword in things like declarations where a datatype or class name is
involved).

Another alternative could be to take out LINK completely and make Link a
File method (I can just hear the boos and hisses now)?

eg:
DIM HFile AS File
OPEN "<source>" FOR READ AS #hFile
hFile.Link("<destination>")
hFile.Close()

Possibly also has the benefit of localizing checks for existance but maybe
not since a race condition could render the handle invalid by the time the
interpretor got from OPEN to File.Link

That brings up another idea:

OPEN [LOCKED] "<source>" FOR {READ|WRITE|BOTH} AS #handle

Where the OPEN fails if it can't get a file lock immediately after opening
when LOCKED is specified.  The idea being to allow serialized/atomic file
access sections (of course CLOSE would then have to be aware of locking
and drop the lock after committing buffers but prior to making the close
system call).

> Date: Sat, 28 Oct 2006 14:58:55 -0400
> From: Rob <sourceforge-raindog2 at ...94...>
> Reply-To: mailing list for gambas users
>     <gambas-user at lists.sourceforge.net>
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] Changes in LINK
>
> On Saturday 28 October 2006 12:38, Benoit Minisini wrote:
> > I think I will invert the arguments, which will lead to source
> > incompatibility between versions <= 1.9.45 and versions >=
> > 1.9.46.
> > What do you think about that?
>
> I think this is a good idea.  It's a shame you couldn't change
> the TO keyword to something else so that rather than
> accidentally creating backward links, old code just wouldn't
> compile.
>
> Rob
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher





More information about the User mailing list