hometagsloginregister

Ready to Participate?
Ready to Participate?
Get Started!
Log In

Avatar
Do I get the same character back if I delete and then restore something?
If I'm using an editor, and I delete a character and then "undo" to get it back, do I get the same character back?
Or is it one that looks remarkably similar?

What if I overtype the same text - does it re-use the same characters again?


Not interested in what MS Word "compare and merge" documents says, because it produces a new document when you run it anyway.
And it's so full of bugs that I wouldn't trust it to get that right.
asked in computers, philosophy, characters

Answers

siasl74 answers:

The answer to that will be nestled deeply inside the code for "undo". What possibly happens is that every time you do something, the action is copied/recorded onto a fixed length stack/buffer in memory. When you click the "Undo" button, it would need to call an inverse operation to remove what you did. So, when you delete a character, the stack is probably incremented with "Delete(char = "x", posn = y)". When you click the "undo" button, a function probably written as "call Proc_inverse(method = Delete, in_params=" "x",y")", and the inverse of "Delete" in this case would be "Insert", and so a new instance of the character would be created.

Anyhow, that's how I'd design the program - implementation in various systems may vary!!


3 years ago / reply

Messerwisser answers:

Most editors have memory that stores several steps so you can go back to earlier versions. To see if anything has been changed you can check the code.
Every character you see on the screen has it's origin in the "font storage" in your computer - unless it is a picture of a character.
(You already know this so I may have misunderstood your Q)


3 years ago / reply

duffield1 answers:

Philosophically, I'd say that it is a clone that shares the same original - you are each time duplicating a letter from the character map, so it is both the same and different. Both the deleted and the replaced characters are first generation clones, but, for the time they exist, have their own distinct identity and purpose.


3 years ago / reply

seacommander answers:

I would say that you do not get the same character back. The character will be stored as a digital code so that when you restore the digital code will be used to generate de novo the corresponding character.


3 years ago / reply

Comments


No Comments