1. Itzhak's Hebrew wordp

Itzhak wrote:
> Every computer in Israel has built-in Hebrew support.. The only think
> I have to do, is to make an editor that will read the keys and show which
> key was pressed on the other direction, from right to left.
> Do you have any idea where to begin? :)

I recall I had a somewhat similar problem way back, about 8-9 years ago,
when I was using "console" computers with tape storage, called Mikrosha
and PK 100 (or something like that).I even knocked together a small Russian word
processor in Basic. Of course, I have a very dim memory of what I did then,
and of course I don't have the source code for it now. And I had to
redefine the characters as well, by tweaking the character generator table;
as there's built-in support for Hebrew, you don't even need to do that.

What I did back then in Basic was very primitive--something like

Build a 2-dimensional array for each character & line, then read in and echo
keypresses, check if it was a control code (Bkspace, up, down, etc.), and if
not, feed the character into the array for the current line. Then check if
there was a line overflow, and if that was the case, retrace to the previous
Space character, then feed the letters after it into the next-line array,
and so on in a continuous loop. In case of a control character, respond
accoringly. If it _was_ a control character: if Up or Down, check current
position in the current-line array, then shift focus to previous or
next line arrays, an so forth; if Backspace, immediately zap previous
position in the array and redimension the array, once again checking for over-
flow/unerflow, and placing the word before the 1st space in the next/prev.
line-arrays into the current-line array, etc, and promptly printf the
changed lines(arrays) on the screen. You could also use direct screen memory
pokes, position checks, etc, but that's kinda involved.

It's a very simplistic approach, but it may work if you aren't an exper-
ienced programmer. It can be implemented more elegantly using Euphoria
sequences, even in line with this (overly straightforward) method. I'm
ony suggesting it because I feel it's the simplest one, and there should
be no trouble controlling the direction in which the characters appear
on the screen and in the arrays. Just get the screen extents and start
the get_key() loop.

That's about as much as I can recall. Hope this helps--or have I confused
you even further?


new topic     » topic index » view message » categorize


Quick Links

User menu

Not signed in.

Misc Menu