Solved

Long strings in Delphi 1.0

Posted on 1997-05-27
8
150 Views
Last Modified: 2010-04-04
We have a massive app written in Delphi 2.0 which uses a lot of VERY long strings.  Now we have to re-do it for Delphi 1.0.  It seems that we must contrive a custom class for handling strings of arbitrary length, longer than Delphi 1's limits.  Others must have faced this.  How is it done?  Deeply appreciate any help.
0
Comment
Question by:normpos
8 Comments
 

Author Comment

by:normpos
Comment Utility
Edited text of question
0
 
LVL 3

Expert Comment

by:mheacock
Comment Utility
You might have to use PChars.
0
 
LVL 1

Expert Comment

by:buemoh
Comment Utility
That's a bad way - downsourceing.

Strings where different handled in Delphi 2.x and 1.x, therefore:

If you want to have all the easy to handle string-handling-routines, the best way may be to build a new string-class in Delphi 1.x which supports all this functions.

If you've only used ANSI-string routines in delphi 2.x, you can change alle string statements into PChar-statments.

Both possibilities are not done without any changing of code.

There may be some string-classes for Delphi 1.x on some web-sites, like Delphi Super page.

Bye

hartwig

-----------------------------------------------------------
///\\\ Hartwig MOTAL ///\\\  e-mail: moh@bue.magwien.gv.at
 Weinberggasse 60/9/7, A-1190  Vienna/Austria/Europe

0
 

Expert Comment

by:tfwong
Comment Utility
How LONG is the string you need to handle ?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:normpos
Comment Utility
tfwong:  Thank you for your interest.  Your question, "How Long":  Answer:  Arbitrary length, generally much longer than the 65K limit in Delphi 1.0.  Do you know the URL for Delphi Super page?
0
 

Expert Comment

by:tfwong
Comment Utility
There are several Delphi Super Pages as far as I know, you can visit my page with some delphi links at:

http://www.asiaonline.net.hk/~tfwong/computer.htm

0
 

Author Comment

by:normpos
Comment Utility
buemoh:  Thank you for your interest.  Yes, I have to "build a new string class" in Delphi 1.  How is this done?  If you can help me, you can have the 100 points.  -- Norm
0
 
LVL 1

Accepted Solution

by:
ozzy earned 100 total points
Comment Utility
Why not setup a new type called lstring and make it an array or characters?  Or use PChar.  They are easy to use.

If you are concered about the 64k limit, make a pointer, use getmem and the size you will need and point a pointer to it.  Then you can reference the string and it can be as long as you need it.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now