Commit Graph

175 Commits

Author SHA1 Message Date
Jonas Maebe
a4804a3c25 * let FloatToStr output the correct number of decimals in case the
first significant digit is preceded by several zeroes (patch by
    C. Western, mantis #16907)

git-svn-id: trunk@19738 -
2011-12-03 22:34:00 +00:00
marco
7c1f4b8f20 * pass format string to doformaterror procedure. Mantis 16253
git-svn-id: trunk@17080 -
2011-03-05 17:02:43 +00:00
sergei
131b7fcdb2 * RTL: Replaced deprecated formatting symbols with their up-to-date counterparts, reduces compiler noise.
* Also removed some unused variables.

git-svn-id: trunk@16744 -
2011-01-09 15:27:05 +00:00
michael
b93ab63038 * Fixed IntToHex in case of (0,0)
git-svn-id: trunk@16026 -
2010-09-20 07:46:04 +00:00
michael
154c6ec4d2 * Implementation of values 11..15 of negcurrentformat from Zeljan Rikalo
git-svn-id: trunk@15982 -
2010-09-14 11:23:41 +00:00
michael
f7b268713d * Patch from Zeljan Rikalo to fix issue #13722 (FloatToStrF negative 0)
git-svn-id: trunk@15945 -
2010-09-06 11:09:39 +00:00
Jonas Maebe
89be8d45e3 * use TrueBoolStrs/FalseBoolStrs for *StrToBool* (mantis #16848)
git-svn-id: trunk@15764 -
2010-08-10 13:06:22 +00:00
Jonas Maebe
a18f2594e2 * fixed FloatToStr for ffGeneral when dealing with numbers whose number of
significant digits before the decimal points matches the precision
    parameter exactly (mantis #16188)
  * round instead of cut off digits in FloatToStr with ffGeneral
  * take into account the minus sign when determining whether a number needs
    to be represented using ffExponent instead of ffGeneral because it has
    too many digits

git-svn-id: trunk@15114 -
2010-04-05 14:54:24 +00:00
paul
5cc182ac07 rtl: fix FormatFloat to skip first spaces
git-svn-id: trunk@14490 -
2009-12-28 15:53:35 +00:00
florian
230142f08b * change length parameter of CompareMem/CompareMemRange into PtrUInt, resolves #15190
* use CompareByte inside these routines instead of simple handmade code

git-svn-id: trunk@14435 -
2009-12-13 11:42:05 +00:00
marco
5163b44ac6 * Patch for "formatsettings" overloads of currency functions, mantis 15067
git-svn-id: trunk@14162 -
2009-11-13 09:10:24 +00:00
florian
44f588b7ad * fixed nested comment warning
git-svn-id: trunk@13450 -
2009-07-26 12:55:01 +00:00
florian
ee49e8acb6 * SScanf uses StrToFloat to convert the string to a float so it has to use DecimalSeparator to parse the string
* test adapted to use DecimalSeparator to create the test string

git-svn-id: trunk@13399 -
2009-07-16 21:12:45 +00:00
florian
87df99a53d * reverted partially r11598 because it breaks delphi compatibility and e.g. tw3721.pp
git-svn-id: trunk@13398 -
2009-07-16 21:01:27 +00:00
Jonas Maebe
55578e8226 * fixed FloatToDecimal() for inf/nan (mantis #14143, thanks to
Sergei Gorelkin for the test program)

git-svn-id: trunk@13394 -
2009-07-16 13:11:36 +00:00
Jonas Maebe
8cae53bb18 * fixed errors with parsing negative, >$99 and invalid BCD numbers in
BCDToInt() (patch from Milla, mantis #13512)

git-svn-id: trunk@13052 -
2009-04-27 16:46:42 +00:00
Jonas Maebe
e8edc31a89 * don't insert thousandseparator if it is #0 (mantis #13552, patch by
Jesus Reyes)

git-svn-id: trunk@13028 -
2009-04-23 19:16:49 +00:00
Jonas Maebe
8d2f3946e0 * fixed TextToFloat() in case ThousandSeparator = DecimalSeparator, based
on patch by Bart Broersma (mantis #13307)

git-svn-id: trunk@12885 -
2009-03-14 15:20:46 +00:00
Jonas Maebe
f13006c7f2 * changed the output parameters of a bunch of *tofloat() and
trystrtocurr() from var to out (mantis #13289)

git-svn-id: trunk@12862 -
2009-03-07 15:17:58 +00:00
Jonas Maebe
dc2d1c6926 * fixed (harmless) range check errors
* fixed indentation

git-svn-id: trunk@12709 -
2009-02-07 22:25:07 +00:00
michael
a469e84820 * And yet another extra test plus fix
git-svn-id: trunk@12335 -
2008-12-11 09:04:48 +00:00
michael
6d93a762fd * And once more fixed formatfloat. All results consistent with Delphi now
git-svn-id: trunk@12323 -
2008-12-10 20:39:16 +00:00
michael
87a6193f4f * Hopefully fixed formatfloat negative value bugs once and for all
git-svn-id: trunk@12303 -
2008-12-05 10:54:22 +00:00
michael
f64ec1faa6 * removed debug statement
git-svn-id: trunk@12088 -
2008-11-14 13:06:45 +00:00
michael
0d53564797 * Fixed bug #12385
git-svn-id: trunk@12087 -
2008-11-14 13:04:51 +00:00
michael
ca4fa01f8f * Fixed formaatfloat for negative numbers (Bug ID 11711) objpas/sysutils/sysstr.inc
git-svn-id: trunk@11680 -
2008-08-31 22:25:19 +00:00
marco
03fd61b68d * booltostr overload
git-svn-id: trunk@11600 -
2008-08-17 13:26:02 +00:00
marco
24d8341ed6 * (IDE-sysutils) dateutil has now unpacktime/packtime alike to Delphi dt.
* newstr and disposestr for pshortstring in sysutils. Avoids import order
     problems because of duplicate definitions of pstring between objects
     and sysutils

git-svn-id: trunk@11598 -
2008-08-17 12:10:35 +00:00
michael
1ea2129c0d * Changed var to out parameters for strtoint*
git-svn-id: trunk@11314 -
2008-07-02 18:00:07 +00:00
giulio
cc08543f57 Patch from Petr Kristan for AnsiStrComp/AnsiStrIComp to fix comparison
when both strings are empty and differ after the null character + test.

git-svn-id: trunk@11277 -
2008-06-25 07:07:54 +00:00
Jonas Maebe
e60e078eb5 * only allow decimalseparator to be used as decimal separator in
texttofloat() and friends, rather than both '.' and decimalseparator
    (mantis #9126)

git-svn-id: trunk@11069 -
2008-05-24 08:49:34 +00:00
Jonas Maebe
2067da9a62 * patch from Giulio Bernardi to fix the generic AnsiStrIComp,
AnsiStrLComp and AnsiStrLIComp (mantis #11235):
   * fixed wrong equality result in case one of the strings
     was shorter than the other but matched the start
   * AnsiStrLComp and AnsiStrLIComp should ignore embedded #0
     characters

git-svn-id: trunk@10846 -
2008-04-30 19:02:01 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
Jonas Maebe
200f1e5643 * fixed webtbs/tw10519.pp for CPUs which don't support extended
git-svn-id: trunk@9893 -
2008-01-24 10:33:14 +00:00
peter
6ed3d91989 * CompareText for shortstrings added
* optimize CompareText
  * use CompareText for case-insenstive compares in the RTL
  patches from Sergei Gorelkin

git-svn-id: trunk@9384 -
2007-12-02 18:36:20 +00:00
yury
d568718cb0 * Removed UpperCaseTable and LowerCaseTable variables and TCaseTranslationTable type from interface part. These variables are used only by generic upper/lower case conversion routines. They are not used on Windows targets and it is bad idea to let users use these variables. Users must use AnsiLowerCase and AnsiUpperCase routines.
git-svn-id: trunk@9301 -
2007-11-20 10:45:50 +00:00
yury
220a37b443 * Do not fill generic upcase and lowcase conversion tables for windows targets, because generic ANSI routines are not used here.
git-svn-id: trunk@9049 -
2007-11-01 16:15:29 +00:00
yury
7240f723ef * Fixed warnings.
git-svn-id: trunk@9048 -
2007-11-01 16:05:46 +00:00
marco
827d380691 * pchar(pointer()) isms that were safe.
git-svn-id: trunk@8672 -
2007-09-28 21:57:45 +00:00
Jonas Maebe
a57f9e0672 + added QWord overloads for IntToHex, hexStr, OctStr, binStr
git-svn-id: trunk@8332 -
2007-08-29 12:06:54 +00:00
Jonas Maebe
49a545aef2 * fixed FormatFloat for non-x86 (mantis 9384)
git-svn-id: trunk@8220 -
2007-08-04 17:38:48 +00:00
florian
e1125c3f7f + StrNextChar implemented
git-svn-id: trunk@7803 -
2007-06-24 20:30:55 +00:00
Jonas Maebe
d3736f563f * fixed several range errors
git-svn-id: trunk@6857 -
2007-03-14 19:47:53 +00:00
marco
e56abc47b7 * formatfloat patches for #8388 and 8386
git-svn-id: trunk@6697 -
2007-03-03 14:02:20 +00:00
Jonas Maebe
241645961d * converted CP850UCT and CP850LCT into #-notation (mantis #8104)
git-svn-id: trunk@5952 -
2007-01-13 19:12:02 +00:00
yury
3b70222574 * fixed again ffExponent format in FloatToStrFIntl.
* updated test for FloatToStr.

git-svn-id: trunk@5940 -
2007-01-13 13:52:17 +00:00
Jonas Maebe
ab79ccf277 * better fix than the one in r5920
git-svn-id: trunk@5926 -
2007-01-12 18:31:11 +00:00
Jonas Maebe
d1c351462d * fixed FloatToStrFIntl for platforms without extended
git-svn-id: trunk@5920 -
2007-01-12 16:27:31 +00:00
michael
fcce3195b6 * TFormatSettings implementation, stage 3 (final)
git-svn-id: trunk@5899 -
2007-01-11 20:25:18 +00:00
michael
cab9811e02 * TFormatSettings implementation, stage 2
git-svn-id: trunk@5897 -
2007-01-11 20:01:33 +00:00
yury
a4a125e561 * fixed FloatToStrF for ffExponent format.
* fixed FloatToStrF for non Extended values.
+ added test for FloatToStr.

git-svn-id: trunk@5894 -
2007-01-11 18:33:15 +00:00
yury
df10089076 * currency is handled directly in StrToCurr, CurrToStr, CurrToStrF functions.
* improved Delphi compatibility of FloatToStrF.

git-svn-id: trunk@5879 -
2007-01-11 01:50:33 +00:00
marco
4264f5d041 * booltostr now D7 compat.
git-svn-id: trunk@5744 -
2006-12-29 21:19:46 +00:00
Jonas Maebe
5133e7161a + newer version of FloatToDecimal
* use more precision for extended (Delphi compatible)

git-svn-id: trunk@5517 -
2006-12-01 18:18:23 +00:00
Jonas Maebe
fb22cb9efc * fixed web bug #7756
git-svn-id: trunk@5516 -
2006-12-01 17:00:03 +00:00
marco
304be38ec1 * datetotime-def functions (but not yet FormatSettings) + ansidequotedstr (turned
out to be extractquotestr wrapper).

git-svn-id: trunk@5032 -
2006-10-27 18:20:02 +00:00
Jonas Maebe
5213992110 * fixed mantis tw7637
git-svn-id: trunk@4995 -
2006-10-21 17:11:06 +00:00
Jonas Maebe
908c9741d3 + added some comments explaining the previous commit
git-svn-id: trunk@4950 -
2006-10-17 15:04:40 +00:00
Jonas Maebe
961667784a * fixed tstrreal3, hopefully didn't break anything else
git-svn-id: trunk@4949 -
2006-10-17 13:47:54 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
florian
215b870f5e * StrToBool friends, fixes #7222
git-svn-id: trunk@4378 -
2006-08-06 15:38:27 +00:00
florian
0a9a9dd69c - mispelled TryStrQWord removed
git-svn-id: trunk@4143 -
2006-07-11 20:03:21 +00:00
michael
89d52a3be9 + Added StrToQWord
git-svn-id: trunk@4063 -
2006-07-02 09:25:35 +00:00
Jonas Maebe
7338c03fac + comp and int64 overloads for floattostr(f)
git-svn-id: trunk@2403 -
2006-02-02 10:33:12 +00:00
Jonas Maebe
e9a6b3dc10 * fixed some FloatToStrF and FloatToStr precision problems. Still fails
for some corner cases (e.g. 8.502 as double), but that problem is in
    str_real

git-svn-id: trunk@2390 -
2006-02-01 10:22:52 +00:00
florian
f60d89cc75 + StrToQWord patch from Vincent Snijders
git-svn-id: trunk@2148 -
2006-01-03 22:15:22 +00:00
Jonas Maebe
5769739834 * fixed floattostr and friends for systems where extended = double
git-svn-id: trunk@1882 -
2005-12-05 14:09:35 +00:00
florian
446c24ed77 * fixed StrToFloat for large constants
git-svn-id: trunk@1817 -
2005-11-24 20:50:40 +00:00
tom_at_work
7a1860190b * fixes error introduced in sscanf() when looking for 64 bit unsafe pointer casts
git-svn-id: trunk@1632 -
2005-11-02 19:55:57 +00:00
tom_at_work
653f4b465d * fixed some typecasts of pointers to Longint for 64 bit architectures (Linux and generic parts of the RTL only)
* 64 bit sockets unit fixes

git-svn-id: trunk@1625 -
2005-11-01 22:40:23 +00:00
Jonas Maebe
f67ffaa7c8 * fixed TextToFloat for platforms where currency = Int64 (webtbs/tw4093)
git-svn-id: trunk@1402 -
2005-10-16 06:28:14 +00:00
florian
e0d2eee158 * GenericAnsiStrComp fix from Vincent Snijders
git-svn-id: trunk@1172 -
2005-09-24 09:59:26 +00:00
florian
c94849ddb0 * readded overload directive to lowercase
+ lowercase(<variant>);

git-svn-id: trunk@1156 -
2005-09-22 17:18:28 +00:00
florian
6bce91adc0 + CurrToStrF
+ ListSeparator

git-svn-id: trunk@1100 -
2005-09-17 19:31:59 +00:00
florian
af3b2f28ca * generic AnsiStrComp fixed
git-svn-id: trunk@1057 -
2005-09-06 21:07:16 +00:00
florian
547c3f92b2 * AnsiReplaceText fixed, fixes 4260
git-svn-id: trunk@807 -
2005-08-07 07:57:27 +00:00
florian
6ed53e2c70 * Trim removes now all spaces and controll chars
+ Trim* for widestrings

git-svn-id: trunk@618 -
2005-07-13 08:32:41 +00:00
florian
cfcaff7dc9 * fixed mysql date problems using sscanf :]
* better integer parsing in sscanf

git-svn-id: trunk@609 -
2005-07-10 13:43:49 +00:00
florian
4258bee1c5 + char support for sscanf
git-svn-id: trunk@605 -
2005-07-09 22:42:39 +00:00
florian
0d79442d0f + sscanf
git-svn-id: trunk@604 -
2005-07-09 22:34:26 +00:00
michael
7fb254755d + Optimizations for lower/uppercase functions
git-svn-id: trunk@380 -
2005-06-11 13:14:59 +00:00
florian
64c72bd312 * patch from Joost van der Sluis to remove VIRTUALPASCAL define since VP is officially dead
git-svn-id: trunk@374 -
2005-06-10 17:05:35 +00:00
michael
8a226bba52 + Removed HASWIDESTRING/HASWIDECHAR defines
git-svn-id: trunk@241 -
2005-06-07 20:42:22 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
michael
ffb55c4254 + Removed VER1_0 defines
git-svn-id: trunk@33 -
2005-05-19 21:14:45 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
michael
b60c5b9cd2 + Fixed bug #3957 2005-05-09 18:35:06 +00:00
florian
c36eadddf7 + variants: string -> float/int casts 2005-04-28 09:15:43 +00:00
michael
525e2cf1ff + Added FormatCurr by Uberto Barbini 2005-04-26 16:40:51 +00:00
Jonas Maebe
2426ecafc3 * fixed several warnings and notes about unused variables (mainly) or
uninitialised use of variables/function results (a few)
2005-03-25 22:53:39 +00:00
marco
1ec105d95e * some 1.0.x fixes 2005-03-13 14:30:24 +00:00
florian
0bfbd0a18e + added Ansi* routines to widestring manager
* made them using OS calls on windows
2005-03-12 14:56:22 +00:00
Jonas Maebe
8281d7a359 * fixed newstr() and disposestr() 2005-03-01 19:23:03 +00:00
Jonas Maebe
1162235207 * fixed web bug #3708 2005-02-28 11:12:17 +00:00
florian
eb4b962cee + implemented WideFormat
+ some Widestring stuff implemented
  * some Widestring stuff fixed
2005-02-26 10:21:17 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
michael
525832f03a + Patch from peter to fix 1.0 compile 2005-02-07 08:29:00 +00:00
florian
3ed23de88e + StrCharLength infrastructure 2005-02-06 09:38:45 +00:00
peter
b89cddc0ec * extended overload disabled for powerpc 2005-01-17 18:38:48 +00:00