Jump to content

Turbo Delphi


Recommended Posts

Has anyone heard of Turbo Delphi? It's the programming language that my school required us to use while doing AS computing, and it's kinda stuck with me.

Has anyone here used this language?

Anyway, part of the program I'm making involves the user entering a number, which I'll call "A" for the sake of this thread.

In my code, I'm trying to do 1.5^(a-1), however the language does not allow this. Can anyone provide any logical suggestions that would provide the same result?

Sorry for the off-topic randomness :)
Link to comment
Share on other sites

Hell, last time I saw Delphi it hardly seemed to let you even write code; however, here you go:

[url="http://delphi.about.com/od/beginners/a/delphicourse.htm"]http://delphi.about.com/od/beginners/a/delphicourse.htm[/url]

Best i can fathom, I hardly understand the source itself because i'm not very familiar with it. Perhaps some of the snippets contained in this tutorial can put you on the right path?
Link to comment
Share on other sites

[quote name='Hatu' timestamp='1327545028' post='52311']
In my code, I'm trying to do 1.5^(a-1), however the language does not allow this. Can anyone provide any logical suggestions that would provide the same result?
[/quote]

I don't know anything about Delphi specifically, but the following is mathematically equivalent:
b assigned (1.5^a)/1.5

Or if the limitation is one mathematical operation per assignment:
b assigned 1.5^a
b assigned b/1.5
Link to comment
Share on other sites

Lots of languages do not support the exponent operator ^. I would look for a function to do this for you. In C++ I think it's something like pow(x,y); where the result is x^y.

It also depends on whether we're talking about Win32 delphi or .NET delphi, but there appears to be an example of how to do it for Win32 here: [url="http://www.festra.com/wwwboard/messages/2170.html"]http://www.festra.com/wwwboard/messages/2170.html[/url]
Link to comment
Share on other sites

good luck with that!

when I had to use a visual delphi thing at Uni I thought it was very appropriately named... After the Delphic Oracle, who produced random results after dosing up on random drugs. It was easy to get it to do the thing it was designed for but I seem to remember we just couldn't get it to do specific things we wanted.

Hey maybe it becomes easier to code in if you're drunk or on mushrooms ?
  • Upvote 2
Link to comment
Share on other sites

Delphi is object orientated turbo-pascal within a VERY mighty IDE.
Thats the whole story already:)

The language/sytax is c++ like at a few points and you can do very nice software with it.

The compiler is originally Borland which is one of the fastest compilers in the world, which is producing very optimized and fast executables.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...