From: "Barry Brevik" <[EMAIL PROTECTED]> Sent: Friday, May 14, 2004 3:10 PM
> I'm trying to stuff a variable with a string, then use it with INPUT so that > the user sees, and has the option to accept (by pressing ENTER at the start > of the field) this default string I've put in the variable. For example: > > A.STRING = 'HELLO WORLD' > INPUT @(00,02) A.STRING > > This works fine, except the '@' form of input sends an escape sequence to my > terminal that obliterates any attributes I want for the field, such as > inverse or bold. > > However, if I dump the @(00,02) and use > > A.STRING = 'HELLO WORLD' > PRINT @(00,02): > INPUT A.STRING > > ...my inverse/bold attribute stays, but my 'HELLO WORLD' string does not > appear in the input area! It appears that using INPUT without the '@' > actually converts A.STRING to an empty string before prompting the user. > > Is it possible to get both features? Actually, I know it is because we run a > 3rd party app that does it, but I can't see inside it. I haven't got a Universe machine here, but off the top of my head: A.STRING = "HELLO WORLD" DISP.COL = 0; DISP.LINE = 2; BOLD = 1; GOSUB GET.A.STRING: FIRST.VALUE = A.STRING ... A.STRING = "GOODBYE WORLD" DISP.COL = 0; DISP.LINE = 3; BOLD = 0; GOSUB GET.A.STRING: SECOND.VALUE = A.STRING GET.A.STRING: CRT @(DISP.COL, DISP.LINE): * IF (BOLD) THEN CRT @(-???): ;* Fill in the attribute I can't remember right now END * CRT A.STRING: @(DISP.COL, DISP.LINE): INPUT MIGHT.BE.A.STRING * IF (MIGHT.BE.A.STRING) THEN A.STRING = MIGHT.BE.A.STRING END * RETURN ------- u2-users mailing list [EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users