home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / masm / masm5 / mixed / bamain.bas < prev    next >
Encoding:
BASIC Source File  |  1988-08-11  |  567 b   |  23 lines

  1. DEFINT A-Z
  2.  
  3. ' Function call for QuickBASIC, Version 4,
  4. '   and for future versions of Microsoft and IBM BASIC Compilers
  5. ' Comment out for older versions
  6.  
  7. DECLARE    FUNCTION Power2(A AS INTEGER, B    AS INTEGER)
  8. PRINT "3 times 2 to the power of 5 is ";
  9. PRINT Power2(3,5)
  10.  
  11. ' Subprogram equivalent to function for QuickBASIC, Versions 1, 2, and 3;
  12. '    for the Microsoft BASIC Compiler through Version 5.36
  13. '    for the IBM BASIC Compiler through Version 2.02
  14.  
  15. ' A = 3
  16. ' B = 5
  17. ' CALL Power2S(3,    5, C)
  18. ' PRINT "3 times 2 to the power of 5 is "; C
  19.  
  20. END
  21.  
  22.  
  23.