Microsoft KB Archive/41389

= SIGNAL Is Basic Reserved Word; SIGNAL ON Usable Only in OS/2 =

Article ID: 41389

Article Last Modified on 11/21/2006



This article was previously published under Q41389



SUMMARY
The ON SIGNAL(n) GOSUB and SIGNAL ON statements are implemented only in OS/2 protected mode for programs compiled with BC.EXE in Microsoft Basic Compiler Versions 6.00 and 6.00b or Microsoft Basic PDS Version 7.00.

SIGNAL is a reserved word in QuickBasic Versions 4.00, 4.00b, and 4.50, Microsoft Basic Compiler Versions 6.00 and 6.00b, and Microsoft Basic PDS Version 7.00. However, the SIGNAL statements will be accepted only by Basic 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 &quot;Advanced feature unavailable&quot; error message.



MORE INFORMATION
The BC.EXE compiler that comes with Basic compiler 6.00 and 6.00b and Basic PDS 7.00 supports the ON SIGNAL(n) GOSUB and SIGNAL ON statements, as documented in Section 5 (Pages 27-29) of &quot;Microsoft Basic Compiler 6.0: User's Guide&quot; for Versions 6.00 and 6.00b for MS OS/2 and MS-DOS and the &quot;Microsoft Basic 7.0: Language Reference&quot; manual on Pages 341-342.

Below is an example of the correct use of the ON SIGNAL(n) GOSUB and SIGNAL ON statements. This program is supported only if you compile in OS/2 protected mode with BC.EXE from Microsoft Basic Compiler Version 6.00 or 6.00b, or Microsoft Basic PDS Version 7.00, and run the resulting executable in protected mode: PRINT &quot;This program traps CTRL+BREAK in OS/2. Try it.&quot; ON SIGNAL(4) GOSUB trap SIGNAL(4) ON  10 a$ = INKEY$ IF a$ = &quot;&quot; THEN GOTO 10 END trap: PRINT &quot;CTRL+BREAK trapped. Press any key to quit&quot; RETURN The above program always reports &quot;Advanced feature unavailable&quot; when run in real mode (DOS) as a compiled executable or when run inside the QuickBasic QB.EXE or the Basic PDS 7.00 QBX.EXE environments.

Additional query words: QuickBas BasicCom

Keywords: KB41389

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.