Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEWBIE

Status
Not open for further replies.

DirtyB

Programmer
Mar 13, 2001
159
US
This is my first day using Delphi. I was wondering if anyone knows some good resources for very basic things. What is Delphi? What is it used for? Can it be used over the web?

And more specifically, how do I change data types?

Thanks
 
Try out:
.

What is delphi? it is a programming language.
What it is used for? everything.

example? Make a front application that accesses an Oracle, SQL-sever or other database.

Everything that is possible with VB or Visual C, but better and faster.

What do you mean by changing data types?

Steven van Els
SAvanEls@cq-link.sr
 
I think he's asking: How to change a string to a number, or a number to a string, or a logical to a string, or a date to a string?

In delphi, this is done using functions and procedures. Many are already defined, sometimes it's useful to define your own. Try:

deststr := IntToStr( inInteger );
deststr := DateToStr( inDate );
deststr := FloatToStr( inFloat );
destInt := StrToInt( inString );
DestInt := StrToIntDef( inString, DefaltInt );
STR( InInteger, deststr );

check the help on these and click "See ALso" for other related functions.
 
WGCS:

THANK YOU. I am just trying to convert data types, from string to number, etc... Your response was what I was looking for, sorry if it wasn't clear.

Svanels:

If I write an app in Delphi, can I only do client/server, desktop apps, or can I write web deliverable applications? Also, just out of curiousity, what makes you say that Delphi is better than the others? I'm having a hard time learning this stuff on my own and am wondering if I can be sold on it.

thanks to both of you.
 
About web and XML look at

New to delphi?

Look at the left side of the page for the topics you can dive into.

Why I say that Delphi is better than the others, I don't need to learn other languagues to make my programs work. I have an engineering background and have done some fairly complex programing using simulation, calculations, did also some finite elements in pascal long time ago, inventories, now I am poking around in database linked to a distributed control system in an oil refinery.

I think that the other members will have their stories about what they are doing with Delphi.

Delphi has a 90% acceptance in this forum, which is high compared to others.

About hard times learning delphi, try to code in C. If programming was as easy as driving a bycicle, we wouldn't need to buy M$ word, we would make our own word processor....

Best Regards Steven van Els
SAvanEls@cq-link.sr
 
Straightly speaking, Delphi is not a programming language, it's a programming environment which uses programming language such as Pascal or C, etc. It's particularly useful for GUI applications.

R
 
The first thing that makes Delphi better than VB has always been that Delphi compiles to a true executable. By this I mean that I can make a Delphi program and give the compiled code to my customer without any run-time libraries to slow it down. On the other hand, I used to program in VB. Every time I made even the simplest program, I had to make a setup routine and send at least three disks with my "executable" file and many, many, many run-time libraries to make the code go on the other system.

I heard that with .NET M$ had finally changed it so that VB actually does compile, but it took years upon years, a major rewrite to the "compiler," and hiring one of the Delphi architects away from Borland.

Second and related to the above, true compiled code results in blazing speed. I saw some comparisons where Delphi apps ran 200 times faster than their VB counter parts. Delphi runs at near C++ speed. That is no small accomplishment. One of the advertising slogans from years ago still holds true, "the ease of VB, the speed of C++."

Third, there are things Delphi can do that VB can't. This may be something else that changed with VB.NET, but in VBA (forced to use it even now at work) and the last VB I used, you still couldn't do the following:
recursion
true objects with constructors
linked lists and other dynamic memory functions

Why couldn't you do them? Because M$ said that VB programmers didn't need them (or true compiled code). And while VB guys get frustrated and pull out their hair, Borland gives its customers exactly what they want in Delphi: a language that will produce powerful programs like C++ but be easy to use.
 
I just remembered some other advantages Delphi has over VB.

1. Don't like the limited number of components that come in VB? Delphi ships with hundreds of premade components to do most of the hard work for you.

2. Can't find a component to do exactly what you want in either VB or D? If you are a Delphi programmer, you can write a component yourself IN DELPHI that can be used in other applications. Want to write a component for VB? Sorry. You'll have to use VC++. Or if you want, you can use Delphi to write an ActiveX component that will work in either Delphi or VB. How's that for service with a smile?

3. A VB programmer wrote once, "Visual Basic makes the easy things easier. Delphi makes the hard things easy."
 
Some remarks Fluke026. Where VB is relying heavily on third party components, they come ready within Delphi but at a certain price.

There are 3 editions, (4 in Delphi 7), where the standard edition doesn't give the source code for modifying components.

The professional and enterprise editions are the ones needed for real programming.

The Enterprise edition can be compaired to the complete M$ Visual Studio Suite Steven van Els
SAvanEls@cq-link.sr
 
As a relatively new Delphi programmer (I started using it the end of June), I can relate to your difficulties in getting started. But I have to agree with the experienced guys, Delphi is amazing! Most of my prior programming experience was web based (ASP, VBScript and Javascript) so it was very difficult for me to get a clue about Delphi. After 2 months of using however, I am convinced that I want to continue to develop with Delphi. My biggest problem is finding the answers in the Help, that's why I love tek-tips so much! Good luck! Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
A hint Leslie, type in the word you need help on somewhere in the unit, highlight it, and press F1 Steven van Els
SAvanEls@cq-link.sr
 
WOW! Thanks everyone. There is a lot of good information in this post and I really appreciate it. Now if I can minimize my learning curve i'll be able to start writing some real code in Delphi and have a better judgement.

 
If you can find it, "Delphi 3 for Dummies" was an excellent book. I have been programming in Delphi for six years now, but I still learned some good things in that book last summer even though I use D5. More recent books in the Dummies series might be just as good.
 
I liked the Teach Yourself Delphi 3 in 14 days that came included with the standard edition I bought in 1997. Steven van Els
SAvanEls@cq-link.sr
 
Steven,

I knew about the F1, but unfortunately I don't always know what I'm looking for! I just know that there's something I want to do and it should be possible and I start hunting through the help. It's gotten much easier lately, but I still seem to spend a lot of time searching for the answers (and waiting for answers to tek-tip posts! LOL).
Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top