Entering the 'Edit Integer' window
|
12-19-2023, 08:12 PM
Post: #1
|
|||
|
|||
Entering the 'Edit Integer' window
A little thing that niggles me a lot is when trying to enter the 'Edit Integer' window to convert hex to dec etc, which I often do, I press Shift then press '-'. Most of the time upon first press the calculator will output a # to the home screen.
What causes this, and how can I stop it? Is it possible for me to set up my own shortcut to call the 'Edit Integer' window? |
|||
12-19-2023, 08:52 PM
Post: #2
|
|||
|
|||
RE: Entering the 'Edit Integer' window
Isn't that just letting you enter a hex value?
|
|||
12-19-2023, 08:57 PM
(This post was last modified: 12-19-2023 09:06 PM by matalog.)
Post: #3
|
|||
|
|||
RE: Entering the 'Edit Integer' window | |||
12-19-2023, 10:21 PM
Post: #4
|
|||
|
|||
RE: Entering the 'Edit Integer' window
It signals that you are about to do integer arithmetic:
"You indicate that you are about to engage in integer arithmetic by preceding the number with the pound symbol (#," The intent of the integer screen is to let you enter a number in any base. |
|||
12-19-2023, 11:02 PM
Post: #5
|
|||
|
|||
RE: Entering the 'Edit Integer' window
(12-19-2023 10:21 PM)KeithB Wrote: It signals that you are about to do integer arithmetic: Sorry, I don't seem to be understanding you. I know what the pound symbol is for, but it is supposed to be called by the Alpha key plus the '3' key. Not by the Shift key plus the '-' key. |
|||
12-20-2023, 12:26 AM
(This post was last modified: 12-20-2023 12:32 AM by Dougggg.)
Post: #6
|
|||
|
|||
RE: Entering the 'Edit Integer' window
You can use either one it is the same character, it may have been oversight bu eitherbone will work
Actually may be a bug, in home the base I get a #, in cas it pulls up a edit integer screen, probably in home should pull up the edit integer as well, I think it use to |
|||
12-20-2023, 12:56 AM
Post: #7
|
|||
|
|||
RE: Entering the 'Edit Integer' window
(12-20-2023 12:26 AM)Dougggg Wrote: Actually may be a bug, in home the base I get a #, in cas it pulls up a edit integer screen, probably in home should pull up the edit integer as well, I think it use to In Home, if item 1 on the history stack is an integer, then SHIFT+Base brings up the Edit Integer screen. Otherwise it puts # into the input line. This behaviour is too deliberate to be a mistake so make of it what you will. I suspect they thought of a better way for SHIFT+Base to work only after the keyboard layout was finalised and it was too late to change the character that ALPHA-3 produced. |
|||
12-21-2023, 09:20 AM
Post: #8
|
|||
|
|||
RE: Entering the 'Edit Integer' window
So is there a way to definitely get into the Edit Integer window with one or 2 key presses?
Is there any way to call the window from a program? In which case, I could write a program to get me there in one keypress. |
|||
12-21-2023, 02:20 PM
Post: #9
|
|||
|
|||
RE: Entering the 'Edit Integer' window
I don't see a "BASE" or "EDITBASE" command in the toolbox catalog.
|
|||
12-26-2023, 07:24 PM
Post: #10
|
|||
|
|||
RE: Entering the 'Edit Integer' window
(12-19-2023 11:02 PM)matalog Wrote:(12-19-2023 10:21 PM)KeithB Wrote: It signals that you are about to do integer arithmetic: Hi Matalog First entering in hex, octal, decimal or binary like: ALPHA-3, Value, Format; '#11001b', Enter. When in the first stack, '2nd', 'Base' and it opens the integer arithmetic with the Input from stack. Regards, Tschumi |
|||
12-26-2023, 09:38 PM
(This post was last modified: 12-26-2023 10:21 PM by komame.)
Post: #11
|
|||
|
|||
RE: Entering the 'Edit Integer' window
In general, to enter the "Edit Integer" window with the first press of Shift [-], there are two approaches. The first approach involves having an integer value on the history stack (marked with a "#" sign at the beginning) as someone already mentioned in this thread. As for the second approach, the only condition is to be in edit mode (blinking cursor). There doesn't need to be any value on the stack or even in the editing field where the cursor is; you just need to enter the edit mode of anything. For instance, you can go to HOME and press the space, multiplication, or any other key that outputs any character on the screen (then the cursor will appear - edit mode), then press Shift [-] and the "Edit Integer" window will open immediately. Another good example is the PPL editor, which is always in edit mode and pressing Shift [-] always immediately opens "Edit Integer".
If you're not in edit mode, the first press produces "#" and simultaneously switches to edit mode, so the second press opens the "Edit Integer" window and the "#" character here has no impact on the fact of opening this window. I am convinced that the appearance of the "#" sign after pressing Shift [-] is not only problematic, but it is definitively a bug. This is because if there’s no value on the stack and the first press of Shift [-] causes "#" to appear, and the second press opens the "Edit Integer" window, then after finishing editing the value by clicking "OK" (or pressing Enter), the "#" sign is automatically added, which results in a double "#" sign, such as ##64, in the command line in HOME, which is an incorrect value. I see no justification for such behavior. (12-20-2023 12:26 AM)Dougggg Wrote: Actually may be a bug, in home the base I get a #, in cas it pulls up a edit integer screen, probably in home should pull up the edit integer as well, I think it use toNope, in CAS it behaves exactly the same way as in HOME. On the other hand, using this in CAS probably doesn't make sense, because the result of the editing from this window will be interpreted in CAS as a character string, not as a number. Piotr Kowalewski |
|||
12-27-2023, 06:54 AM
Post: #12
|
|||
|
|||
RE: Entering the 'Edit Integer' window
(12-21-2023 09:20 AM)matalog Wrote: So is there a way to definitely get into the Edit Integer window with one or 2 key presses? I don't know, but 'GETBASE()' can be the solution with a Prog.. When SETBASE is predefined to decimal (Settings -> Integer)you also can go the way with '#25', '2nd', 'Base'. Regards |
|||
01-04-2024, 06:16 PM
(This post was last modified: 01-04-2024 06:18 PM by komame.)
Post: #13
|
|||
|
|||
RE: Entering the 'Edit Integer' window
(12-21-2023 09:20 AM)matalog Wrote: So is there a way to definitely get into the Edit Integer window with one or 2 key presses? Hi Matalog, If you use the "Customizing key presses" described in the manual (third edition) on page 615, you can enable persistent user mode (by pressing the "User" combination twice (Shift+Help, Shift+Help)) and then, by applying the appropriate program, you can simulate the "Edit Integer" window. I am attaching a very simple example that demonstrates this capability. It also works in other programs, even in the PPL editor. But it's just a proof of concept; it converts only from DEC to HEX and only small numbers. Only the keys from 0 to 9, backspace and Enter work; there's no error handling, no optimization, etc. However, you can adapt it to your needs and then you'll probably achieve what you're looking for. The header "KEY KS_Minus()" means that the program is assigned to the "Base" function, replacing the original "Edit Integer" mechanism as long as you have the user mode enabled. Best wishes, Piotr |
|||
01-07-2024, 11:23 PM
Post: #14
|
|||
|
|||
RE: Entering the 'Edit Integer' window
Yes, good idea, it's great for quick conversion of dec to hex.
Thanks. |
|||
01-08-2024, 12:33 AM
(This post was last modified: 01-08-2024 12:50 AM by matalog.)
Post: #15
|
|||
|
|||
RE: Entering the 'Edit Integer' window
Here is the program adapted to convert Hex to Dec or Dec to Hex, you can switch with the 'Apps' button.
Code: KEY KS_Minus() |
|||
01-08-2024, 01:12 AM
(This post was last modified: 01-08-2024 09:27 AM by matalog.)
Post: #16
|
|||
|
|||
RE: Entering the 'Edit Integer' window
And a little bit shorter: (edited)
Code: KEY KS_Minus() |
|||
01-08-2024, 11:59 AM
Post: #17
|
|||
|
|||
RE: Entering the 'Edit Integer' window
And stopping the program run beyond it's limits.
It can handle numbers up to #FFFFFFFFF or 999999999999. Apps switches between hex and dec input and symb resets to zero. Code: KEY KS_Minus() |
|||
01-08-2024, 07:35 PM
(This post was last modified: 01-08-2024 07:43 PM by komame.)
Post: #18
|
|||
|
|||
RE: Entering the 'Edit Integer' window
I've added some optimizations.
Code: KEY KS_Minus() I think we're not far from a solution where this could be turned into a real editor, with the ability to move the cursor across the digits (left and right) and edit them at specific positions. I'm leaving for the whole day tomorrow, but if you don't get this sorted out by then, I'll take care of it the day after tomorrow |
|||
01-08-2024, 10:49 PM
Post: #19
|
|||
|
|||
RE: Entering the 'Edit Integer' window
Something in the line
h:=CHAR(EXECON("hc[&1+1]",CONVERT(value,"base",16))); Seems to be crashing the program as soon as it is run on my calcualtor. |
|||
01-08-2024, 11:14 PM
Post: #20
|
|||
|
|||
RE: Entering the 'Edit Integer' window
This is the same version reverted to the old way for h:= and working again, mainly so I have access to look at it in work tomorrow if I get time.
Code: EXPORT intedit() |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 8 Guest(s)