Bug 65167 - pasting numbers are always taken as decimal
Summary: pasting numbers are always taken as decimal
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
: 77906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-29 09:00 UTC by Volker Kuhlmann
Modified: 2004-04-27 22:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Kuhlmann 2003-09-29 09:00:28 UTC
Version:           1.3.2 (using KDE 3.1.1)
Installed from:    SuSE
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB

A hexadecimal number 2750830 pasted into kcalc (middle-click) is taken as decimal even when "hex" is selected while pasting, making it impossible to convert 0x2750830 into decimal without retyping the number.
Comment 1 Josh Metzler 2003-11-20 17:46:39 UTC
This works for me with the 3.2 beta.

If I select 0x12345 and middle click on KCalc with hexadecimal selected, it pastes 12345.  If decimal is selected, middle clicking pastes 74565.

Make sure to select the 0x part, too.
Comment 2 Volker Kuhlmann 2003-11-20 21:28:41 UTC
Subject: Re:  pasting numbers are always taken as decimal

> If I select 0x12345 and middle click on KCalc with hexadecimal
selected, it pastes 12345.  If decimal is selected, middle clicking
pastes 74565. >  > Make sure to select the 0x part, too.

Correct - with the 0x it works for me too. Sorry but this behaviour is
not really a good idea - take an HP pocket calculator, and you'll be
cursing if they made you type 0x in front of every number. Accepting 0x
*as well* is nice, though. When I select hex and enter 1234, I expect to
get 0x1234. When I enter 0x1234, I get 0x1234 irrespective of which base
is currently selected - that's nice!

Volker

Comment 3 Klaus Niederkrüger 2004-03-31 11:59:52 UTC
*** Bug 77906 has been marked as a duplicate of this bug. ***
Comment 4 Ferdi de Bruin 2004-03-31 12:52:26 UTC
If you cut 0x12F34 you can paste because it recognizes HEX. 
But you can't paste 12F34 since decimal values are expected now(and KCalc says 0). 
This implies that you can't cut/paste partial hex numbers f.i. F34 and paste this into the calcualator because the 0X is missing in front! 
This behaviour is not practical.
Comment 5 Klaus Niederkrüger 2004-04-05 22:01:08 UTC
I have just changed the behavior in KDE-CVS. Now pasting any number in Hex is always interpreted as being a Hex-number.
Comment 6 Richard Bos 2004-04-27 22:19:48 UTC
Is this one really solved?

If I cut and past the 1234 from a konsole into kcalc
it becomes 4d2. That's very unexpected to me, as I just
want it to stay 1234!  I know that it is a hex value
as the context is h'1234.  The h' means it is hex.