BBS: Inland Empire Archive Date: 10-30-92 (16:35) Number: 343 From: BOB PERKINS Refer#: NONE To: EARL MONTGOMERY Recvd: NO Subj: Re: Let's get some code b Conf: (2) Quik_Bas
EM> ways. I'll look your code over off-line. I'm sure I'll find improvements. Not improvements, just different ways of doing things.. :-) DO..LOOP is one of my favorite structures. Let me present an oddball sort of routine which I had to write awhile back to read data from a serial device at work. I had to poll com3 instead of using interrupt drive communications. Change the addresses to work with a different port. IF (INP(&H3ED) AND 1) THEN 'data coming in. DO 'go into input loop.. x% = INP(&H3E8) 'get the character. IF x% = 10 THEN EXIT DO 'input terminated with linefeed.. z$ = z$ + CHR$(x%) 'add character to string.. LOOP WHILE (INP(&H3ED) AND 1) 'safety net if LF not seen.. END IF --- Msg V4.5 * Origin: Reciprocity Failure (1:124/4115.236)
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