Documentation example error for import...

Notices and updates

Documentation example error for import...

Postby oofoe » Sat Sep 17, 2016 2:28 pm

Hi!

Hope this is the best place to post this...

The first example for import at http://www.newlisp.org/downloads/newlis ... tml#import is incorrect. It should have the following marked line added:
Code: Select all
(define LIBC (lookup ostype '(
("Windows" "msvcrt.dll")
("OSX" "libc.dylib")

(import LIBC "printf") ;; This line needs to be added to make example work.

(printf "%g %s %d %c\n" 1.23 "hello" 999 65)

Thanks!
Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm

Re: Documentation example error for import...

Postby Lutz » Sun Sep 18, 2016 2:54 pm

Lutz
 
Posts: 5258
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Documentation example error for import...

Postby oofoe » Mon Sep 19, 2016 1:28 pm

Hi!

Thanks very much for fixing that. It's a small thing, but it can really trip someone up when they're trying to make something like that work for the first time.

Any possibility of getting the "(import LIBRARY)" syntax in Windows too? With maybe some way to list the symbols in the library?

Thanks!
Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm


Return to newLISP newS

Who is online

Users browsing this forum: No registered users and 1 guest

cron