[M3devel] fcntl last parameter int vs. pointer
Daniel Alejandro Benavides D.
dabenavidesd at yahoo.es
Sun Jul 15 03:44:36 CEST 2012
Hi all:
I'm sorry for you That I didn't exampled my self my point (perhaps I'm being too abstract for this point), but if you cared to tell all that I will say it more openly:
Doing that type conversion as the first url says (look third row at the beginning a. literal)
http://web.cs.mun.ca/~ulf/pld/mocplus.html#subclassing
You will break the modular safety.
However I'm telling you that one can make such an abstraction in Modula-3 (in Baby sized language) with functional programming making obeying subtype fcntl1 <: fcntl2, of course Jay I suppose your fcntl1 is badly signed, am I right?
OK, I hope I'm being clearer.
Thanks for the patience of all of that, in advance
--- El sáb, 14/7/12, Jay <jay.krell at cornell.edu> escribió:
De: Jay <jay.krell at cornell.edu>
Asunto: Re: [M3devel] fcntl last parameter int vs. pointer
Para: "Daniel Alejandro Benavides D." <dabenavidesd at yahoo.es>
CC: "m3devel" <m3devel at elegosoft.com>, "Jay K" <jay.krell at cornell.edu>
Fecha: sábado, 14 de julio, 2012 20:11
Daniel your replies are pointless. You have exhausted my patience.
- Jay (briefly/pocket-sized-computer-aka-phone)
On Jul 14, 2012, at 8:31 AM, "Daniel Alejandro Benavides D." <dabenavidesd at yahoo.es> wrote:
Hi all:
In fact both C and Modula-3 don't allow a signature change, original C compiler and decompiler type check the signature, although type casting is possible in both languages:
http://web.cs.mun.ca/~ulf/pld/mocplus.html
However, when talking about a functional language you can override as in Baby Modula-3 the type at instantiation time for methods and values, so I guess you can sort of relax the strict rules in that relation of the two object function types (to make it a subtype):
http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-95.pdf
see p. 10 - S. 3.2.4 - Discussion
I just know they could make it work, but it was very hard complex system.
Thanks in advance
--- El sáb, 14/7/12, Jay K <jay.krell at cornell.edu> escribió:
De: Jay K <jay.krell at cornell.edu>
Asunto: [M3devel] fcntl last parameter int vs. pointer
Para: "m3devel" <m3devel at elegosoft.com>
Fecha: sábado, 14 de julio, 2012 03:27
Thoughts on
Unix__fcntl(int fd, int request, int arg)
{
return fcntl(fd, request, arg);
}
vs.
Unix__fcntl(int fd, int request, INTEGER arg)
{
return fcntl(fd, request, arg);
}
where int is 32bits and INTEGER is exactly the same size as a pointer.
Will it "just work" if I change it?
arg is sometimes a pointer, sometimes an integer, maybe sometimes other?
Ok, let's assume 32bit integer and 32bit or 64bit pointer are the only possibilities.
Are there calling conventions that care? And will pass the parameter differently/wrong?
Do any calling conventions pack multiple smaller-than-64bit parameters
into one 64bit register?
I'm *guessing* no.
I guess, as well, I can experiment with a few...
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120715/c159d709/attachment-0002.html>
More information about the M3devel
mailing list