Macintosh QuickBASIC Converts "CLIP: " Clipboard Tabs to Commas (67377)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0a
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0b

This article was previously published under Q67377

SUMMARY

When reading from the "CLIP:" clipboard device in QuickBASIC for the Apple Macintosh, any tab characters in the clipboard will be converted to commas. This is not a problem in QuickBASIC but a feature that allows the easy transfer of data from word processors, spreadsheets, and other applications that use the tab character to separate data elements. To read the text exactly as it was cut or copied into the clipboard, open the "CLIP:TEXT" device instead.

This information applies to QuickBASIC for the Apple Macintosh versions 1.00, 1.00a, and 1.00b.

MORE INFORMATION

Note that tab characters have an ASCII value of 9.

When the following statement is used to open the clipboard for input, strings input using INPUT$ or LINE INPUT #1 will be read with tab characters converted to commas:
   OPEN "clip:" FOR INPUT AS #1
				
Because the INPUT # statement reads strings separated by commas one at a time, the INPUT # statement can easily parse blocks of text clipped from tabular forms, such as spreadsheets or word processor tables.

If the following statement is used to open the clipboard for input, strings will be input with tabs left intact:
   OPEN "clip:text" FOR INPUT AS #1
				
For additional information on the "CLIP:" device and other generalized I/O devices, see page 123 in the "Advanced Topics" section of the "Microsoft QuickBASIC For Apple Macintosh: User's Guide."

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:KB67377