1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-20 22:05:15 +00:00
qb64/internal/help/_CLIPBOARD$_(statement).txt
Luke Ceddia b586eafd3b Integrated _BLINEINPUT into regular LINE INPUT for BINARY files
LINE INPUT will now use the faster method if passed a file handle
that has been opened FOR BINARY. As such, the _BLINEINPUT command
has been removed.

qb64.bas now takes advantage of this for reading from '$include files,
at least in Include Manager 1. Some tweaking of internal/source/main.txt
was required to get things into a sane state, so I'm holing off changing
the compiler any further so the auto-builder can make sure everything's
smoothed over.

Note: Everything should still compile as normal; I'm just being overcautious.
2014-07-27 00:06:17 +10:00

40 lines
1.6 KiB
Plaintext

The {{KW|_CLIPBOARD$ (statement)|_CLIPBOARD$}} statement sets the {{KW|STRING}} value in the system clipboard.
{{PageSyntax}}
:{{KW|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = {{Parameter|string_expression$}}
{{PageDescription}}
* {{Parameter|string_expression$}} is the string value sent to the clipboard.
* The string value will replace everything previously in the clipboard.
* Assemble long text into one string variable value before using this statement.
* Add CHR$(13) + CHR$(10) CRLF characters to move to a new clipboard line.
* When copying text files, end line CRLF characters 13 and 10 do not have to be added.
* Numerical values can be converted to strings using [[STR$]], [[_MK$]], [[MKI$]], [[MKL$]], [[MKS$]], [[MKD$]], [[HEX$]] or [[OCT$]].
* The clipboard can be used to copy, paste and communicate between running programs.
''Example:'' Set 2 lines of text in the clipboard using a carriage return to end text lines
{{CodeStart}} '' ''
{{Cl|DIM}} CrLf AS {{Cl|STRING}} * 2 'define as 2 byte STRING
CrLf = {{Cl|CHR$}}(13) + {{Cl|CHR$}}(10) 'carriage return & line feed
{{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "This is line 1" + CrLf + "This is line 2"
{{Cl|PRINT}} {{Cl|_CLIPBOARD$}} 'display what is in the clipboard
'' ''
{{CodeEnd}}
{{OutputStart}}This is line 1
This is line 2
{{OutputEnd}}
:''Note:'' The text in the clipboard could also be sent to a file using [[PRINT (file statement)|PRINT #1]] [[_CLIPBOARD$]].
{{PageSeeAlso}}
* {{KW|_CLIPBOARD$}} (function)
* {{KW|CHR$}}, {{KW|ASCII}} (code table)
{{PageNavigation}}