Help with Delphi Functions

Get help on programming - C++, Java, Delphi, etc.
Post Reply
Charger14
Registered User
Posts: 302
Joined: 05 Jul 2004, 02:00
Location: In my chair

Help with Delphi Functions

Post by Charger14 »

Hey all,me is having a little trouble with a program. I have a integer array with 4 indexes,I need to get the largest number out of the array and from which index it came from. i dug around in Delphi help and came up with a MaxIntValue function,which apparently was just what I wanted,then I stuck it in and Delphi says its an undeclared something... Anyone got any ideas?

Also can anyone explain to me how to use the InitiateSystemShutdown() Declaration? I like putting little surprises into my tests and exams,and Im trying to figure this one out :twisted:

Thanx in advance...[/code]
Is this thing on?Helloooo?
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Post by RuadRauFlessa »

Dude can you be a tad more specific as to what delphi tells you?
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
Charger14
Registered User
Posts: 302
Joined: 05 Jul 2004, 02:00
Location: In my chair

Post by Charger14 »

[Error] Unit1.pas(100): Undeclared identifier: 'MaxintValue'

Thats what I get. And I use it exactly like some examples and the syntax in Delphi...
Is this thing on?Helloooo?
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Post by RuadRauFlessa »

What units you importing?

If you don't have math then add it.

Anyway I see one problem with that and it is that you still don't have the location within the matix where the number is located. That is obviously if you get this to work. Looks like you would have to loop through the matrix in any case trying to find a match for the value you get back. Better to just create a method containing a loop that goes through the matrix and saves the value and the position if it is higher than the one you have stored thus far. Verry easy stuff really. Grade 10 School work.

Shutdown Code
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
iREADyourEMAIL
Registered User
Posts: 947
Joined: 06 Aug 2005, 02:00
Contact:

Post by iREADyourEMAIL »

woo i can get help here?
this year i started delphi at school, i got kylix(delphi for linux)and so far it as been quite cool
but when you wrote the program(and saved it)
when you run it kylix just crashes......
so i wrote a fancy script that runs the program outside of kylix....but its really crap because you always have to keep open a console and type /home/irye/runkylix Project1
any ideas of what the problem is?
how can i make it work when i click run....
...im running it under mandriva10.2LE
on a amd2600+ with 762RAM

any probelms?


pls help!!!!!
Image
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.
WiK1d
Registered User
Posts: 20732
Joined: 13 Sep 2004, 02:00
Location: Cruising the streets of Pretoria
Contact:

Post by WiK1d »

How much does delphi 7 retail for?
iREADyourEMAIL
Registered User
Posts: 947
Joined: 06 Aug 2005, 02:00
Contact:

Post by iREADyourEMAIL »

well they are selling it at my school
but it is the learners edition(so they say)
but they also say its a pretty hectic price
Image
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.
WiK1d
Registered User
Posts: 20732
Joined: 13 Sep 2004, 02:00
Location: Cruising the streets of Pretoria
Contact:

Post by WiK1d »

At my school it's R580...does that sound legit?
iREADyourEMAIL
Registered User
Posts: 947
Joined: 06 Aug 2005, 02:00
Contact:

Post by iREADyourEMAIL »

um dunno.......i thought i was twice that
but ur probably right
Image
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

didnt read the posts above me... but you probaby have to add something to the "USES" part of the source...

and yeah, so did i... thats why at my 4 schools ago school they kicked me out of computer sciene....
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Post by RuadRauFlessa »

iREADyourEMAIL wrote:woo i can get help here?
this year i started delphi at school, i got kylix(delphi for linux)and so far it as been quite cool
but when you wrote the program(and saved it)
when you run it kylix just crashes......
so i wrote a fancy script that runs the program outside of kylix....but its really crap because you always have to keep open a console and type /home/irye/runkylix Project1
any ideas of what the problem is?
how can i make it work when i click run....
...im running it under mandriva10.2LE
on a amd2600+ with 762RAM

any probelms?


pls help!!!!!
Ask in the mandrivia section. It is not really related to this topic.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
Post Reply