home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / library / comline / qb_cline.bas < prev    next >
BASIC Source File  |  1991-07-01  |  1KB  |  38 lines

  1. '=======================================================================
  2. '
  3. '   PROGRAM FILE:  QB_CLINE.BAS
  4. '
  5. '   DATE:  June 27, 1991 
  6. '
  7. '   VERSION:  1.04                      REVISION DATE:  July 1, 1991
  8. '
  9. '   AUTHOR:  Scott D. Heavner
  10. '
  11. '   LANGUAGE: MicroSoft QuickBasic 4.50
  12. '
  13. '   COPYRIGHT:  1991, Scott D. Heavner
  14. '
  15. '=======================================================================
  16. '
  17. '   DESCRIPTION:  QBCLINE is an example of how to use the COMLINE.ASM
  18. '                 subroutine.  The user should determine what flags and
  19. '                 such he wishes to check for, and incorporate his own
  20. '                 code.  This can be placed as part of a subroutine or
  21. '                 in the main program.
  22. '
  23. '=======================================================================
  24.  
  25. DECLARE SUB cline (BYVAL segvar%, BYVAL valvar%) : ' Declare SUB for FAR call
  26. DIM cin AS STRING * 128:                           ' Dimension Input Variable
  27. CALL cline(VARSEG(cin), VARPTR(cin)):              ' Call using FAR pointer
  28.  
  29. '  The rest can be your program to test the input string
  30.  
  31. length% = ASC(LEFT$(cin, 1))
  32. PRINT "Length = "; length%
  33. PRINT MID$(cin, 2, length%):                       ' Prints only the character
  34.                                                    ' part of the string.
  35. PRINT "Begin previous data . . . "
  36. PRINT RIGHT$(cin, 128 - length%)
  37.  
  38.