Yes, but the $X and $Y values are dependent on the last USE command. Think of them as attributes associated with each device object.
----- Original Message ----- From: "Kevin Toppenberg" <[EMAIL PROTECTED]> To: <hardhats-members@lists.sourceforge.net> Sent: Wednesday, July 13, 2005 2:44 PM Subject: Re: [Hardhats-members] Does W ! flush an output buffer? > I am doing this with a: > use $P write "screen info here." use IO > > Is this correct? > > Kevin > > > --- "A. Forrey" <[EMAIL PROTECTED]> wrote: > > > Remember that the use of the U <device ID> prior to > > the W command > > controls the effect of the "!" or control character > > written. Then you must > > switch back to explicitly control several IO > > devices. > > > > > > On Wed, 13 Jul 2005, Kevin Toppenberg wrote: > > > > > Maury, > > > > > > This was the problem. Apparently with M sees a !, > > it > > > automatically resets $X, but writing a $char(13) > > > doesn't. This seems kind of an odd mechanism. > > > > > > I was switching back and forth between writing > > files > > > out to a file and writing the progress on the > > screen. > > > It seems that there is only ONE $X, not one each > > for > > > the file and another for the screen. So I had to > > make > > > the switch between states just after a ! had been > > > written to the file. > > > > > > Thanks for the help. Also, I hadn't known that > > write > > > *x is the same as write $char(x). So I learn > > > something every day... :-) > > > > > > Thanks > > > Kevin > > > > > > > > > --- Maury Pepper <[EMAIL PROTECTED]> wrote: > > > > > >> It would help to to know what your code looks > > like > > >> and exactly what you want the output to look > > like, > > >> but let me offer a couple of thoughts: > > >> > > >> 1. If you are using the ? tab format character, > > you > > >> need to let GTM know the position of the cursor. > > >> Using ! sets $X to 0. An escape sequence might > > set > > >> $X depending on how it is issued. I don't know > > >> about GTM, but other M's let you set $X directly. > > >> So just insert: > > >> S $X=0 following the W *13 or $C(13). > > >> > > >> 2. Most systems provide a way to define line > > >> length. This can be used to automatically wrap > > long > > >> lines. Common values are 80 and 132. Generally, > > >> there's a way to turn this off or disable it by > > >> setting the line length to 0. It looks like some > > of > > >> your lines are wrapping so you are probably > > having > > >> this problem. Again, the solution is to S $X=0 > > if > > >> GTM allows that and/or disable line wrapping. > > >> > > >> > > >> ----- Original Message ----- > > >> From: "Kevin Toppenberg" <[EMAIL PROTECTED]> > > >> To: "Hardhats Sourceforge" > > >> <hardhats-members@lists.sourceforge.net> > > >> Sent: Tuesday, July 12, 2005 11:47 PM > > >> Subject: [Hardhats-members] Does W ! flush an > > output > > >> buffer? > > >> > > >> > > >>> I am in the middle of writing a function to > > display > > >> a > > >>> progress bar. > > >>> > > >>> I want the bar to stay on one line, so at the > > end > > >> of > > >>> each line, I need to do something to get back to > > >> the > > >>> beginning of line. > > >>> > > >>> My first approach was to write the line, then > > >> write a > > >>> $char(13) to go back to the beginning of the > > line, > > >>> ready for the next refresh. > > >>> > > >>> But this gave very odd output, like this: > > >>> > > >>> Lets begin... > > >>> Progress: > > >>> > > >> > > 94%--------------------------------------------->|| > > >>> Progress: 89%------------------------>|--| > > >>> Progress: > > >>> 84%-------------------------------------->|--- > > >>> Progress: > > >>> > > 74%----------------------------------->|---------| > > >>> Progress: 69%--------------------|-----------| > > >>> Progress: > > >> 64%----------------------------->|-------- > > >>> Progress: > > >>> > > 59%-------------------------->|------------------| > > >>> Progress: > > 49%------------------------------------| > > >>> Progress: 44%------------------->|-------------- > > >>> Progress: > > >>> > > 39%----------------->|---------------------------| > > >>> Progress: > > >> 29%----------------------------------------| > > >>> Progress: 24%---------->|------------------- > > >>> Progress: > > >>> > > 19%-------->|------------------------------------| > > >>> Progress: > > >>> 9%---->|--------------------------------------| > > >>> Progress: 4%->|------------------------ > > >>> -------------------| > > >>> All done!... > > >>> > > >>> > > >>> But if, instead, I write a !, and then issue an > > >> escape > > >>> sequence to move the cursor up one line, it > > works > > >>> perfectly. > > >>> > > >>> It acts like it drops characters unless I write > > a > > >> ! > > >>> > > >>> Does anyone know what is going on? > > >>> thanks > > >>> Kevn > > >>> > > >>> > > >>> GTM> > > >>> > > >>> > > >>> > > __________________________________________________ > > >>> Do You Yahoo!? > > >>> Tired of spam? Yahoo! Mail has the best spam > > >> protection around > > >>> http://mail.yahoo.com > > >>> > > >>> > > >>> > > >> > > > > > > ------------------------------------------------------- > > >>> This SF.Net email is sponsored by the 'Do More > > >> With Dual!' webinar happening > > >>> July 14 at 8am PDT/11am EDT. We invite you to > > >> explore the latest in dual > > >>> core and dual graphics technology at this free > > one > > >> hour event hosted by HP, > > >>> AMD, and NVIDIA. To register visit > > >> http://www.hp.com/go/dualwebinar > > >>> _______________________________________________ > > >>> Hardhats-members mailing list > > >>> Hardhats-members@lists.sourceforge.net > > >>> > > >> > > > > > > https://lists.sourceforge.net/lists/listinfo/hardhats-members > > >> > > >> > > >> > > > > > > ------------------------------------------------------- > > >> This SF.Net email is sponsored by the 'Do More > > With > > >> Dual!' webinar happening > > >> July 14 at 8am PDT/11am EDT. We invite you to > > >> explore the latest in dual > > >> core and dual graphics technology at this free > > one > > >> hour event hosted by HP, > > >> AMD, and NVIDIA. To register visit > > >> http://www.hp.com/go/dualwebinar > > >> _______________________________________________ > > >> Hardhats-members mailing list > > >> Hardhats-members@lists.sourceforge.net > > >> > > > > > > https://lists.sourceforge.net/lists/listinfo/hardhats-members > > > === message truncated === > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Hardhats-members mailing list > Hardhats-members@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hardhats-members ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members