Page 1 of 1

Docomentation example?

Posted: Mon Jan 19, 2009 12:25 pm
by Cyril
Reading new Jeff's introduction to FFI, I have noted that in the documentation of import function in the newLISP manual there are examples of importing printf from the standard C library for Linux, MacOS and Cygwin, but not for standard Win32 distribution. I have noted many times before that amateur windows programmers doesn't typically know where the standard C library is located in their system. Maybe it is a good idea to give them a hint?

Code: Select all

newLISP v.10.0.1 on Win32 IPv4, execute 'newlisp -h' for more info.

> (import "msvcrt.dll" "printf")
printf <77C4186A>
> (printf "pi = %f\n" 3.1415926)
pi = 3.141593
14
Just one more line in the manual.

Re: Docomentation example?

Posted: Mon Jan 19, 2009 5:56 pm
by xytroxon
LOL!

Just what I was looking for yesterday!

Thanks for the speedy service!!!

Even if I had NOT asked for it yet*...

-- xytroxon

* Einstein's "spooky action at a distance"?