[fa.info-mac] MS-BASIC dynamic linking

info-mac@uw-beaver (01/24/85)

From: PETER YAOHWA CHU <chu@su-star>

  This message is for BASIC fans.

  I received "Microsoft BASIC for the Macintosh Building Machine Language 
Libraries" handout from Microsoft yesterday (see BASIC v.2 manual p.103).
I don't expect to try it in the near future, so no questions, please.

  Here are some quotes from that document:

  "...machine langues routines which can be bound to BASIC 
   dynamically at runtime."

  "When BASIC sees a CALL or implied CALL statement, it first sees if the 
routine name is defined as a BASIC subprogram.....  If it is not...,
it checks to see if a BASIC variable has been defined with that name.  If
so, it invokes the machine language routine at the address indicated by
the variable.  If it is not...., it sees if any opened library has a CODE
resource by that name.  If it finds..., it creates a BASIC variable by the 
same name, and store information in that variable which makes subsequent
accesses to the routine very fast. .... This routine must call routines
provided by BASIC to parse its arguments. ..."

  one of the provided routines "picks up the next argument", the types of
argument are: end of argument list, null argument (i.e. ,,), string,
integer, single precision and double precision  (I don't see matrix type)
 
  Other routines deal with data conversion, I/O, error message, string 
descriptor manipulation.

  One of the many examples explains the commands to create a library
using "the Macintosh Development System provided by Apple" which runs on
a Mac. (NOT on a Lisa)
------