The Lahey language manual (early, around page 22 or so), under Input/Output, discusses Carriage Control. The plus sign ("+") in position one is used for printer and screen devices to suppress advance to new line before output. So, just issue the line again, with a "+" character in the first position after the first time it is displayed, to get it to printer over the previous one. Also, you should open the terminal device unit with CARRIAGECONTROL='FORTRAN' in the OPEN statement; see p. 184 of the manual, under OPEN. The manual says FORTRAN is the default for non-storage devices, so I suppose you could skip it in the OPEN. That option in OPEN is in blue text in the manual, so it appears to be a Lahey extension of the standard. I've used overprinting, and it seems to work.
 
Dick Russell
-----Original Message-----
From: Alvaro Fernandez [mailto:[log in to unmask]]
Sent: Wednesday, January 28, 2004 3:50 PM
To: [log in to unmask]
Subject: Truly non-advancing print statement?

I suspect this has been covered before, but I am not sure.

 

What I would like to do is to write an integer counter to the same spot on the screen repeatedly without moving the cursor:

 

Processing time step => X

 

Not

 

Processing time step => 3

Processing time step => 4

Processing time step => 5

 

and not

 

Processing time step => 3 Processing time step => 4 Processing time step => 5

 

 

Using ADVANCE=”NO” in the write statement merely makes the cursor go to the left, as in my second example – no carriage return, but I do get cursor motion. Is there a way to just print in the same spot?

 

Some versions of BASIC have a PRINT @(X,Y). I know we don’t have that…

 

 

Alvaro Fernandez

 


*****************Internet Email Confidentiality Footer******************

Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or deliver
this message to anyone. In such case, you should destroy this message
and notify the sender by reply email. Please advise immediately if you
or your employer do not consent to Internet email for messages of this
kind. Opinions, conclusions and other information in this message that
do not relate to the official business of The Shaw Group Inc. or its
subsidiaries shall be understood as neither given nor endorsed by it.
________________________________________________________________________
The Shaw Group Inc.
http://www.shawgrp.com