BASIC calls C

 BBS: Inland Empire Archive
Date: 09-07-92 (16:03)             Number: 388
From: MARK BUTLER                  Refer#: NONE
  To: CHINIAN WANG                  Recvd: NO  
Subj: BASIC calls C                  Conf: (2) Quik_Bas
 On 08-27-92 Chinian Wang wrote to All...

 CW> Suppose I have a C function declared as
 CW> long pascal finduser(char *user_name, char *user_file);
 CW> can I call the finduser function from BASIC?

 I think this would be declared like so...

        DECLARE SUB FindUser CDECL (UserName$, UserFile$)
             (specifies a C-Declaration)

 and the call in your program would be...

        CALL FindUser(UserName$, UserFile$)

 or just plain...

        FindUser UserName$, UserFile$

 -----------> MHB :-)

... OFFLINE 1.41 * Survival Tip #2:  Never MOON a werewolf.

--- Maximus 2.01wb
 * Origin: Mostly Mail (1:105/319)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET