corsasport.co.uk
 

Corsa Sport » Message Board » General Chat » Bloody Programming » Post Reply

Post Reply
Who Can Post? All users can post new topics and all users can reply.
Icon:
Formatting Mode:
Normal
Advanced
Help

Insert Bold text Insert Italicized text Insert Underlined text Insert Centered text Insert a Hyperlink Insert Email Hyperlink Insert an Image Insert Code Formatted text Insert Quoted text
Message:
HTML is Off
Smilies are On
BB Code is On
[img] Code is On
Post Options: Disable smileys?
Turn BBCode off?
Receive email notification of new replies?

John

posted on 4th Oct 04 at 14:42

I've always wondered why they don't start off on C/C++ but it seems to be the decent unis that don't. In Glasgow Uni we are doing Ada which tbh nobody uses, runs a few boeings but how many ppl are gonae be doin that? Once you learn the fundamentals in whatever language you can apply them to any language very easily. I kno that in no quite as good uni's they get taught every language under the sun but porbably don't hav a deep understanding of how to program properly.


Dom

posted on 4th Oct 04 at 12:02

quote:
Originally posted by 1800ed
quote:
Originally posted by VisibleMan
quote:
Originally posted by 1800ed
Dlephi is a training language, used to be called Pascal (I think) I don't think many commercial programs are written in it. But it's a good way to learn object orientated programming....


pascal was shocking...you might as well had learnt ASM and writen machine code yourself :lol:

yea i can see why its good to learn with, but surely it would better to start people with C/C++ as its the most useful language to know, and will help you 10 fold more than knowing delphi will :boggle:

Well for my AS Level and A level in Computer Science I had to learn Q Basic. Yes that was last year.... :lol:

You are right though, after learning PHP I realised tat it was very similar to C, and now i'm gonna give C++ another shot... C would be the best language to learn in all honesty :)

a level computer science is a joke to be honest, i never did it (going for my music skills instead) but from what people were saying they were doing VB/Basic and working with DB/Excel sheets :lol: i learnt all that stuff ages ago off my own back.

But yea PHP is very similar to C and if i was you mate, i would learn C/Turbo C first, write console programmes and then go on to C++/Visual C, to write windows apps, linux apps etc etc Will help you have a better understanding of C, plus you understand alot more about lower level programming, rather than letting windows do everything etc.

once you done that mate, wack abit of VB in there for good measure, as its always useful to write quick programmes in to do calculations etc etc :thumbs:


ed

posted on 4th Oct 04 at 11:55

quote:
Originally posted by VisibleMan
quote:
Originally posted by 1800ed
Dlephi is a training language, used to be called Pascal (I think) I don't think many commercial programs are written in it. But it's a good way to learn object orientated programming....


pascal was shocking...you might as well had learnt ASM and writen machine code yourself :lol:

yea i can see why its good to learn with, but surely it would better to start people with C/C++ as its the most useful language to know, and will help you 10 fold more than knowing delphi will :boggle:

Well for my AS Level and A level in Computer Science I had to learn Q Basic. Yes that was last year.... :lol:

You are right though, after learning PHP I realised tat it was very similar to C, and now i'm gonna give C++ another shot... C would be the best language to learn in all honesty :)


Andrew

posted on 4th Oct 04 at 11:53

Put the programming away lads, uni is not for another 2 hours :lol: :o


Dom

posted on 4th Oct 04 at 11:53

quote:
Originally posted by 1800ed
Dlephi is a training language, used to be called Pascal (I think) I don't think many commercial programs are written in it. But it's a good way to learn object orientated programming....


pascal was shocking...you might as well had learnt ASM and writen machine code yourself :lol:

yea i can see why its good to learn with, but surely it would better to start people with C/C++ as its the most useful language to know, and will help you 10 fold more than knowing delphi will :boggle:


ed

posted on 4th Oct 04 at 11:48

Dlephi is a training language, used to be called Pascal (I think) I don't think many commercial programs are written in it. But it's a good way to learn object orientated programming....


Dom

posted on 4th Oct 04 at 11:47

quote:
Originally posted by 1800ed
quote:
Originally posted by VisibleMan
how crap is that VB would be -

code:

Dim strPrice as String
If Weekday(Now) >= 2 And Weekday(Now) <= 6 Then
strPrice = "£5 All Day"
Else
strPrice = "Adults £10, Children £5"
End If



couldnt get any easier if you tried :lol:


oh wells mate, good luck ;)

PHP would be the same :)


yea, but php is a web language, bout as much use as a fish with boobs when writing software. but yea, would also be the same in ASP :)
eitherway, still curious to why people use delphi now? :boggle:


ed

posted on 4th Oct 04 at 11:45

quote:
Originally posted by VisibleMan
how crap is that VB would be -

code:

Dim strPrice as String
If Weekday(Now) >= 2 And Weekday(Now) <= 6 Then
strPrice = "£5 All Day"
Else
strPrice = "Adults £10, Children £5"
End If



couldnt get any easier if you tried :lol:


oh wells mate, good luck ;)

PHP would be the same :)


Dom

posted on 4th Oct 04 at 11:40

quote:
Originally posted by PaulW
gota admit tho, tis messy :P

try using FUNCTIONS instead of just PROCEDURES to retrieve input values, etc... or to do long calculations


surely you could scrub the procedures all together and just put the cack within the if statement? :boggle:

eitherway, why do people still use delphi? surely C/C++ is alot easier and more useful to everyone these days? - ive never seen a professional software engineer use delphi, its usually C/C++ or Asm. Only people ive seen use Delphi is game developers.

eitherway, i never liked the language, its almost as bad as pascal :lol: C is the way forward...or VB if ya lazy ;)


Stoneyginger

posted on 4th Oct 04 at 11:39

Delphi 7 eh :lol::lol: i aint been doing that stuff for nearly 2 years and im a chef now so wont use it :lol:


Jamie

posted on 4th Oct 04 at 11:37

program PreAssess (input,output);
VAR day,adults,price,children,noadults,nochildren,costofadults,costofchildren,totalcost,weekday:real;

PROCEDURE Getday;
BEGIN
writeln('Welcome to Super-Slides!');
writeln('Please press A for Weekday, or B for Weekend pricing');
readln(day);
end;

PROCEDURE Getprice;
BEGIN
IF day=A THEN
children=5;
adults=10;

IF day=B THEN
children=5;
adults=5;
END

PROCEDURE Getnochildren;
begin
writeln('Please enter number of children');
readln(nochildren);
writeln;
END;

PROCEDURE Getcostofadults;
begin
costofadults:=noadults*10;
writeln;
END;

PROCEDURE Getcostofchildren;
begin
costofchildren:=nochildren*5;
writeln;
END;

PROCEDURE Gettotalcost;
begin
totalcost:=(costofadults+costofchildren);
END;

{$APPTYPE CONSOLE}

begin
{ TODO -oUser -cConsole Main : Insert code here }
Getday;
Getnochildren;
Getcostofadults;
Getcostofchildren;
Gettotalcost;
writeln(totalcost:3:2);
readln;

END.


PaulW

posted on 4th Oct 04 at 11:37

:lol:

prefer it over VB, mainly cos you dont also distribute a billion DLL's & half your hard-drive with the program you make


Jamie

posted on 4th Oct 04 at 11:37

Its Delphi 7 now old man :lol:


Stoneyginger

posted on 4th Oct 04 at 11:35

I cant believe i still understand all that stuff :) i could never be bothered with Delphi. Got a copy of Delphi 4 somewhere in my room :)


PaulW

posted on 4th Oct 04 at 11:34

gota admit tho, tis messy :P

try using FUNCTIONS instead of just PROCEDURES to retrieve input values, etc... or to do long calculations


Stoneyginger

posted on 4th Oct 04 at 11:31

Cheating bastid :P:P:lol:


PaulW

posted on 4th Oct 04 at 11:28

code:
program PreAssess1.2 (input,output);

VAR
day,noadults,nochildren,costofadults,costofchildren,totalcost,weekday:real;

PROCEDURE Getday
begin
writeln('Welcome to Super-Slides!');
writeln('Please press A for Weekday, or B for Weekend pricing');
readln(day);
end;

PROCEDURE Getnochildren;
begin
writeln('Please enter number of children');
readln(nochildren);
writeln;
end;

PROCEDURE Getcostofadults;
begin
costofadults:=noadults*10;
writeln;
end;

PROCEDURE Getcostofchildren;
begin
costofchildren:=nochildren*5;
writeln;
end;

PROCEDURE Gettotalcost;
begin
totalcost:=(costofadults+costofchildren);
end;

{$APPTYPE CONSOLE}

begin
{ TODO -oUser -cConsole Main : Insert code here }
Getday;
IF day = A then Begin
{Insert the code here for the Day = A thing}
End else Begin
{Insert the code here for the Day <> A thing}
End;
Getnochildren;
Getcostofadults;
Getcostofchildren;
Gettotalcost;
writeln(totalcost:3:2);
readln;
end.


not sure what you want where with the IF statement, but you can see where its moved to...

ps, try lay it out nicely like above :P

[Edited on 04-10-2004 by PaulW]


Dom

posted on 4th Oct 04 at 11:27

how crap is that VB would be -

code:

Dim strPrice as String
If Weekday(Now) >= 2 And Weekday(Now) <= 6 Then
strPrice = "£5 All Day"
Else
strPrice = "Adults £10, Children £5"
End If



couldnt get any easier if you tried :lol:


oh wells mate, good luck ;)


PaulW

posted on 4th Oct 04 at 11:25

your if statement is in the wrong place, hence why your probably get compile errors if you try to test it.


Jamie

posted on 4th Oct 04 at 11:23

Yeah so far got...

quote:

program PreAssess1.2 (input,output);
VAR day,noadults,nochildren,costofadults,costofchildren,totalcost,weekday:real;

PROCEDURE Getday
begin
writeln('Welcome to Super-Slides!');
writeln('Please press A for Weekday, or B for Weekend pricing');
readln(day);
end;

IF day = A
then

PROCEDURE Getnochildren;
begin
writeln('Please enter number of children');
readln(nochildren);
writeln;
end;

PROCEDURE Getcostofadults;
begin
costofadults:=noadults*10;
writeln;
end;

PROCEDURE Getcostofchildren;
begin
costofchildren:=nochildren*5;
writeln;
end;

PROCEDURE Gettotalcost;
begin
totalcost:=(costofadults+costofchildren);
end;

{$APPTYPE CONSOLE}

begin
{ TODO -oUser -cConsole Main : Insert code here }
Getday;
Getnochildren;
Getcostofadults;
Getcostofchildren;
Gettotalcost;
writeln(totalcost:3:2);
readln;

end.


And yep have to use it :(


Dom

posted on 4th Oct 04 at 11:20

never used delphi :boggle:
THIS may help though mate :)

but thinking about it should be something like this -


code:

var
curDate : TDateTime;
strPrice :Word;
Day : array[1..7] of interger;

begin

curDate := Now;
day[1] := 1;
day[2] := 2;
day[3] := 3;
day[4] := 4;
day[5] := 5;
day[6] := 6;
day[7] := 7;

If Day[DayOfTheWeek(CurDate)] >= 1 And Day[DayOfTheWeek(CurDate)] <= 5 then
strPrice := '£5 All Day'
else
strPrice := 'Adults £10, Children £5'

end;



try something like that mate. Ive never programmed in Delphi, nor got it to test, but i just put it together from reading that site...but it should do something :o

btw mate, do you have to do it in Delphi? cant you use VB (something nice and easy :lol: )?

[Edited on 04-10-2004 by VisibleMan]


Jamie

posted on 4th Oct 04 at 10:47

Little help? :lol:


Dom

posted on 1st Oct 04 at 12:14

lol not exactly hard lad :lol:


Jamie

posted on 1st Oct 04 at 08:12

Need to write a program with IF statements.

Mon - Fri its all £5

Sat - Sun
Adults £10
Child £5

:rolleyes:

[Edited on 04-10-2004 by J-Me]