El mié, 06-10-2010 a las 11:50 -0400, Schwab,Wilhelm K escribió:
Levente,
What problem do you have with asking whether someone else has already tried it? Really, have you not seen examples of working hard on advice from one source only to discover yet another limit that was not in fine print?
But Bill, almost all your questions are long and without apparent focus on the real point. Some other times are like this, things that you could easily test by yourself maybe in less time that takes you to write so many words, send the email and wait for a response from someone willing to decipher what the real problem is. Other times you point at problems that you find in your environment without giving better hints than "in a hopefully updated image", "in a, I think, not modified image", "in my machine", that doesn't help in helping you. Then you point some problems that it appears that are very evident to you and whose solution is also very obvious to you but you don't provide a fix for them neither, like the always topic of yours about sockets. Then when someone points and the obvious things you should do (your homework, in verifying yourself what you are asking to the list) or to precise the information needed to better answer you, you respond upset as if anyone should be obliged to answer you or even read your mails. So, please, read http://www.catb.org/esr/faqs/smart-questions.html do your homework and then ask the list.
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Levente Uzonyi [leves@elte.hu] Sent: Tuesday, October 05, 2010 11:09 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] FFI number of arguments
On Tue, 5 Oct 2010, Schwab,Wilhelm K wrote:
yes, that's what the link describes. The open question is whether anyone has successfully done that with 15+ arguments?
It works up to 128 arguments. But why don't you try it yourself?
Levente
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Levente Uzonyi [leves@elte.hu] Sent: Tuesday, October 05, 2010 10:26 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] FFI number of arguments
On Tue, 5 Oct 2010, Schwab,Wilhelm K wrote:
Hello all,
I have been bumping into some functions with large numbers of arguments. One in particular would be best handled in the image if at all possible. The following might be the answer:
http://thread.gmane.org/gmane.comp.lang.smalltalk.squeak.general/98538/focus...
Have any of you done this with >15 (or whatever the cutoff is) arguments?
You can create your own function object and invoke it with an array. Here's an fprintf example on windows:
fprintf := ExternalLibraryFunction name: 'fprintf' module: 'msvcrt.dll' callType: ExternalFunction callTypeCDecl returnType: ExternalType signedLong argumentTypes: { (ExternalType structTypeNamed: #FILE) asPointerType. ExternalType string. ExternalType signedLong }. file := Stdio default fopenWith: 'test.txt' with: 'w'. fprintf invokeWithArguments: { file. 'Your number is %d.'. 42 }. Stdio default fcloseWith: file.
Levente
P.S.: Note that you need the FILE and Stdio classes to run this example.
Bill
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Miguel Cobá http://miguel.leugim.com.mx