1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-20 19:45:15 +00:00
qb64/internal/help/SIGNAL.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

52 lines
1.3 KiB
Plaintext

The SIGNAL keyword was reserved for OS/2 systems (protected mode). See the example for more information about how and why it is used.
{{PageSyntax}}
:: [[ON]] SIGNAL(number) [[GOSUB]] line
:: SIGNAL(number) [[ON]]
*'''[[Keywords currently not supported by QB64|Currently NOT supported in QB64!]]'''
* It will only work with compiler 6.00 and 6.00b and Basic PDS 7.00 when compiling in protected mode under OS/2. In all other situations, a SIGNAL statement results in an "Advanced feature unavailable" error message.
''Example:''
{{CodeStart}}
'' ''
{{Cl|PRINT}} "This program traps CTRL+BREAK in OS/2. Try it."
{{Cl|ON}} SIGNAL(4) {{Cl|GOSUB}} trap
{{Cl|SIGNAL}}(4) {{Cl|ON}}
10 a$ = {{Cl|INKEY$}}
{{Cl|IF...THEN|IF}} a$ = "" {{Cl|THEN}} {{Cl|GOTO}} 10
{{Cl|END}}
trap:
{{Cl|PRINT}} "CTRL+BREAK trapped. Press any key to quit"
{{Cl|RETURN}} '' ''
{{CodeEnd}}
''Output:'' It returns the following when Ctrl-Break is pressed
{{OutputStart}}
This program traps CTRL+BREAK in OS/2. Try it.
CTRL+BREAK trapped. Press any key to quit
{{OutputEnd}}
''Error message in QB4.5 if not using OS 2:''
{{OutputStart}}
Advanced feature unavailable
{{OutputEnd}}
''Source:'' Microsoft KB41389 [[http://support.microsoft.com/kb/41389]]
''See also:''
* [[ON KEY (n)]]
{{PageNavigation}}