You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Any control codes such as Carriage Return, Line-Feed and Backspace are not interpreted by PRINT and will display on the screen as symbols in the current selected font.
edit: Mark beat me by 2 minutes.
Last edited by Greg Lyon; 15 Jan 2008, 12:49 AM.
Reason: cross-post
PRINT "Bob" & $CRLF & "Tom"
Why in the above code doesn't $CRLF produce a carriage return and line feed?
All I see are a couple of funny looking characters on the console.
Actually, the real question is "Why should it produce a...?". Windows Fonts typically define a graphic character for each CHR$(10) and CHR$(13). If PowerBASIC were to arbitrarily interpret these 2 bytes for another purpose, you'd never be able to display these graphic characters. It would simply be impossible. There are two choices available here, and we chose the one which allows the maximum flexibility.
PowerBASIC uses PRINT without an argument to move the print position to the first character on the next line. This has been a standard of BASIC for 30 years or more?
Dartmouth BASIC first public release version June, 1964. Second version enhanced the PRINT command with semi-colon.
However on May 1, 1964 at 4 am, John Kemeny and John McGeachie ran the first BASIC programs to be executed successfully from terminals by the DTSS system. It is not completely clear what the first programs were. However the programs either consisted of the single line: PRINT 2 + 2
or were implementations of the Sieve of Eratosthenes according to a 1974 interview in which Kemeny and McGeachie took part.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment