Detecting ANSI

 BBS: Inland Empire Archive
Date: 06-23-92 (09:42)             Number: 1195
From: ARTHUR SHIPKOWSKI            Refer#: NONE
  To: JIM COYLE                     Recvd: NO  
Subj: Detecting ANSI                 Conf: (2) Quik_Bas
Hello Jim!

Sunday June 21 1992, Jim Coyle writes to All:

 JC>        I was wondering if anyone out there knew how to detect ANSI Color
 JC> graphics. The only way I could think of doing this was to send out some
 JC> ANSI codes and wait to see if the remote CPU sends anything back. I tried
 JC> that and it didn't seem to work very good. If anyone out there knows how
 JC> to do this, please tell me... Some sample code would be much appreciated!

     Assuming SUBs called Transmit (St$) and ReCieVe (St$), that are buffered
Transmit CHR$(27)+"[6n"
   ReCieVe St$
IF INSTR(St$,CHR$(27)+"[") THEN ANSICode%=-1
Basically (no pun intended), we send a cursor request, and
if we get a code back (I don't recall the exact code, so I
just used the first part of any escape sequence), the
remote has ANSI.


--- GoldED 2.40
 * Origin: [The BASIC Point] [North Greece, NY] (1:260/213.2)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET