Jump to content


Photo

Problem: Only 2048 Bytes in a string?


  • Please log in to reply
3 replies to this topic

#1 mcinternet

mcinternet
  • Members
  • 101 posts
  • Gender:Male

Posted 22 May 2007 - 09:02 PM

Hi there,

after the new update today, my Delphi only allows 2048 Bytes in a string!!!!!!

What to do??

Brgds

McInternet

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 May 2007 - 09:17 PM

Hello McInternet,

I am not sure if this is related with Next Suite, string is allways 255 chars long.

Here is a info from Delphi 2006 help too.

ShortString
255 characters
2 to 256 bytes
backward compatibility

AnsiString
~2^31 characters
4 bytes to 2GB
8-bit (ANSI) characters, DBCS ANSI, MBCS ANSI, etc.

WideString
~2^30 characters
4 bytes to 2GB
Unicode characters; multi-user servers and multi-language applications

I didn't change anything related to strings, I think that this is even not possible smile.gif

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 May 2007 - 09:19 PM

PS. I have see now that {$H-} directive to turn string into ShortString.

Maybe this is placed somewhere in code, I think that I didn't use this directive anywhere.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 May 2007 - 10:05 PM

Hello McInternet,

Most probably this flag is somewhere entered in code, 255x8 is 2048 bytes.

I recommend that you use Find in Files option to look inside your code. Also, putting {$H+} will probably solve this problem.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users