Solved

Long strings in Delphi 1.0

Posted on 1997-05-27
8
152 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
ID: 1336609
Edited text of question
0
 
LVL 3

Expert Comment

by:mheacock
ID: 1336610
You might have to use PChars.
0
 
LVL 1

Expert Comment

by:buemoh
ID: 1336611
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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

Expert Comment

by:tfwong
ID: 1336612
How LONG is the string you need to handle ?
0
 

Author Comment

by:normpos
ID: 1336613
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
ID: 1336614
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
ID: 1336615
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
ID: 1336616
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 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