Re: Bug or feature: DISPLAY after OPEN WINDOW....
Posted in 1994
}From: bernha@david.wheaton.edu (Todd A Bernhardt) }Subject: Bug or feature: DISPLAY after OPEN WINDOW.... }Date: 28 Apr 1994 10:35:36 -0500 }X-Informix-List-Id: <news.6550> } }I have looked through our fine Informix 4gl 4.0 manuals to determine }whether this bug/feature is indeed a bug or a feature. However I have }come up with nothing conclusive, so in search of some peace of mind I }turn you, the collective net.wisdom, for the definitive answer. } }... } }OPEN WINDOW w1 AT 10, 10 WITH 4 ROWS, 60 COLUMNS } ATTRIBUTE(BOLD, BORDER, PROMPT LINE LAST) } } DISPLAY "Something or other helpful here." } } PROMPT "Tell me what you know in one char or less: " FOR CHAR ch } } PROMPT "Is ", ch, " so (y/n):" FOR CHAR yn }CLOSE WINDOW w1 } }... } }Next, the dilemma: } }What I had hoped, yea expected, to happen was for the DISPLAY and the }PROMPT to both appear inside the window. You can imagine my }disappointment when I saw the window appear, disappear and then the }DISPLAY and PROMPT text appear on or around the 23rd and 24th lines of }my DEC vt320 terminal. The DISPLAY statement without an AT or TO (or BY NAME) clause makes the program switch out of form mode into line mode. Where the output appears is not entirely deterministic, but what you found is not atypical. Once in line mode, the PROMPT statement stays there. It is the only input statement which works in both line mode and form mode. So, the behaviour you're seeing is correct, even if unexpected -- I hadn't ever seen DISPLAY/PROMPT behave like that, but it is what it should do. Fix: if you want your DISPLAY to display in the window, use a fomr of DISPLAY which displays to windows... Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>