Inout
|
02-05-2023, 11:36 PM
Post: #6
|
|||
|
|||
RE: Inout
(02-05-2023 05:22 PM)Gil Wrote: Why with There's no special case here. SREPL is simply doing what it always does. A narrative description of the above code could be as follows: The program starts with a string in stack level 1. It then replaces all occurrences of the substring "<B>" in that source string with the string created by "19. CHR 1. CHR OVER + +". The number of occurrences (left on the stack by SREPL) is dropped because it is not needed. The code segment "19. CHR 1. CHR OVER + +" simply creates a string with three "characters" (whose ordinal values happen to be 19, 1, and 19). In this situation, those characters have no distinct graphical representation, so you can't see them. You can, however, see the effect they have on subsequent characters being drawn (whether to the display or to a GROB). Those characters (19,1,19) tell the text-rendering software that's built into the 50g to toggle the current bold status (turn it on if it was off, or turn it off if it was on). That's why you see the same characters being used regardless of whether the style is being activated or deactivated. Note that this "style mode" only applies to the string as it is being drawn, and all styles are reset by the O/S to "off" as soon as the string being rendered is completed. SREPL doesn't alter any characters other than the ones specified as the target. The application of styles to text rendered on a display with limited resolution such as the 50g is always going to be of limited value (IMHO). While the 50g does the best it can with what it's got, it's inevitable that styled text will sometimes be difficult to read in certain situations. That's probably why you don't see many people taking advantage of it. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
RE: Inout - DavidM - 02-05-2023 11:36 PM
|
User(s) browsing this thread: 2 Guest(s)