Author Topic: Hey  (Read 11325 times)

dgp9999

  • *
  • Posts: 247
    • View Profile
    • http://molexroots.com
Hey
« Reply #25 on: 2004-02-02 23:57:23 »
I've done some low-level assembly before. I was surprised how easy it is once you've got the operations in memory (yours, not the data registers, hahahaha...heh...) I'd like to do more in that area. I studied the 68000.

xeriouxi

  • *
  • Posts: 370
    • View Profile
I am currently doing...
« Reply #26 on: 2004-02-03 08:31:33 »
Hi!

I have almost finished my 2nd year programming with Delphi (or Pascal as the actual language is called) and it is SO easy! I'm so glad that I took the subject at school! I haven't tried any other languages yet, but they look very... difficult!  :-?

xeriouxi.

dgp9999

  • *
  • Posts: 247
    • View Profile
    • http://molexroots.com
Hey
« Reply #27 on: 2004-02-03 12:36:28 »
Delphi is one of the languages I'm currently learning. I've just started C (not Visual C++) and its proving a tad harder than PASCAL but still okay. Programing languages are all the same, once you know one you know them all.

-Dan

EDIT: 2nd year? We're probably on the same course XD

Caddberry

  • *
  • Posts: 1988
    • View Profile
    • http://animenfo.com/
Re: I am currently doing...
« Reply #28 on: 2004-02-03 20:24:09 »
Quote from: xeriouxi
Hi!

I have almost finished my 2nd year programming with Delphi (or Pascal as the actual language is called) and it is SO easy! I'm so glad that I took the subject at school! I haven't tried any other languages yet, but they look very... difficult!  :-?

xeriouxi.


Pascal = Delphi?

Code: [Select]
PROGRAM Mathgame;                         {Math Fun By Travis...For the good
                                          Grade 10/26/98}
USES CRT ;

VAR SUBANS, COUNT, ADDANS, x, y, z : INTEGER ;
    choice, W, ANS : CHAR ;

PROCEDURE ADD ; FORWARD ;
PROCEDURE SUBTRACT ; FORWARD ;
PROCEDURE MULTIPLY ; FORWARD ;
PROCEDURE DIVIDE ; FORWARD ;
PROCEDURE QUIT ; FORWARD ;
PROCEDURE START;

  BEGIN
    CLRSCR ;
    WRITELN ('        Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  ') ;
    WRITELN ('        Ã                 Welcome to Math Fun!!!                    Ã  ') ;
    WRITELN ('        Ã               Please Select your choice                   à ') ;
    WRITELN ('        Ã    (A)ddition, (S)ubtraction, (M)ultiplication (D)ivision à ') ;
    WRITELN ('        Ã                   Press Q to quit                         à ') ;
    WRITELN ('        Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  ') ;
    READLN (ANS);
   IF  (ANS = 'A') OR (ANS = 'a') THEN ADD ;
   IF  (ANS = 'S') OR (ANS = 's') THEN SUBTRACT ;
   IF  (ANS = 'M') OR (ANS = 'm') THEN MULTIPLY ;
   IF  (ANS = 'D') OR (ANS = 'd') THEN DIVIDE ;
   IF  (ANS = 'Q') OR (ANS = 'q') THEN QUIT ;
  end;

  PROCEDURE ADD ;

  begin
    x := Random (10) + 1 ;
    y := Random (10) + 1 ;
    CLRSCR ;
    COUNT := 0 ;
    WRITELN (' Welcome to addition of whole numbers ') ;
    WRITELN ( x,' + ',y ) ;
    WRITE (' Enter your answer here please: ') ;
    Repeat
      COUNT := COUNT + 1 ;
      READLN (ADDANS) ;
      Z := (X+Y) ;
      IF Z <> ADDANS
        THEN WRITELN ('Please Try Again') ;
      IF Z = ADDANS
        THEN WRITE (' Great Job! You used ',count )
          ELSE WRITE (' Please Try again you have had ',count ) ;
      IF COUNT = 1
        Then write (' try! ')
          Else Write (' tries! ') ;
    Until (ADDANS = Z) OR (COUNT = 3) ;
    READLN ;
    If ADDans <> z
      then Addans := Z ;
    IF ADDANS = Z
      THEN BEGIN
    Writeln (' Would you Like another Problem?? ') ;
    Writeln ('       (Y)es        (N)o          ') ;
    readln  (choice) ;
      If choice = 'y'
        Then Choice := 'Y' ;
      If choice = 'Y'
        Then Add
          Else Start ;
  end ;
  end;

  PROCEDURE SUBTRACT ;

  begin
    REPEAT
      x := Random (20) + 1 ;
      y := Random (20) + 1 ;
    UNTIL (X-Y > 0) ;
    CLRSCR ;
    COUNT := 0 ;
    WRITELN (' Welcome to Subtraction of whole numbers ') ;
    WRITELN ( x,' - ',y  ) ;
    WRITE (' Enter your answer here : ') ;
    Repeat
      COUNT := COUNT + 1 ;
      READLN (ADDANS) ;
      Z := (X-Y) ;
      IF Z <> ADDANS
        THEN WRITELN ('Please Try Again') ;
      IF Z = ADDANS
        THEN WRITE (' Great Job! You used ',count )
          ELSE WRITE (' Please Try again you have had ',count ) ;
      IF COUNT = 1
        Then write (' try! ')
          Else Write (' tries! ') ;
    Until (ADDANS = Z) OR (COUNT = 3) ;
    Readln ;
    If ADDans <> z
      Then Addans := Z ;
    IF ADDANS = Z
      THEN BEGIN
    Writeln (' Would you Like another Problem?? ') ;
    Writeln ('       (Y)es        (N)o          ') ;
    readln  (choice) ;
    If choice = 'y'
      Then Choice := 'Y' ;
    If choice = 'Y'
      Then Subtract
        Else Start ;
   end ;
  end;

  PROCEDURE MULTIPLY ;

  begin
    REPEAT
      x := Random (10) + 1 ;
      y := Random (10) + 1 ;
    UNTIL (X*Y > 0) ;
    CLRSCR ;
    COUNT := 0 ;
    WRITELN (' Welcome to Multiplaction of whole numbers ') ;
    WRITELN ( x,' * ',y  ) ;
    WRITE (' Enter your answer here : ') ;
    Repeat
      COUNT := COUNT + 1 ;
      READLN (ADDANS) ;
      Z := (X * Y) ;
      If ADDans <> z
        then Addans := Z ;
      IF ADDANS = Z
        THEN BEGIN
               Writeln (' Would you Like another Problem?? ') ;
               Writeln ('       (Y)es        (N)o          ') ;
               Readln  (choice) ;
                 If choice = 'y'
                   Then Choice := 'Y' ;
                 If choice = 'Y'
                   Then multiply
                     Else Start ;
             end;
    UNTIL (Addans = z) or (Count = 3)     ;
   end ;

    PROCEDURE DIVIDE ;

  begin
    REPEAT
      X := random (20) + 1 ;
      Y := random (10) + 1 ;
      Z := (X DIV Y) ;
    UNTIL X MOD Y = 0 ;
    CLRSCR ;
    COUNT := 0 ;
    WRITELN (' Welcome to Division of whole numbers ') ;
    WRITELN ( x,' / ',y  ) ;
    WRITE (' Enter your answer here : ') ;
    Repeat
      COUNT := COUNT + 1 ;
      READLN (ADDANS) ;
      If ADDans <> z
        then Addans := Z ;
      IF ADDANS = Z
        THEN BEGIN
      Writeln (' Would you Like another Problem?? ') ;
      Writeln ('       (Y)es        (N)o          ') ;
      readln  (choice) ;
        If choice = 'y'
          Then Choice := 'Y' ;
        If choice = 'Y'
          Then divide
            Else Start ;
             end;
     Until (Addans = z) or (count = 3) ;
   end ;

  PROCEDURE QUIT ;
    BEGIN
    CLRSCR ;
    WRITELN ('        Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  ') ;
    WRITELN ('        Ã                                                           Ã  ') ;
    WRITELN ('        Ã                 Good Bye From Math Fun!!!!!               à ') ;
    WRITELN ('        Ã                  We Hope to see you Soon!!                Ã  ') ;
    WRITELN ('        Ã                      Press Q to quit!!                    Ã  ') ;
    WRITELN ('        Ã                                                           Ã  ') ;
    WRITELN ('        Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã Ã  ') ;
    READLN ;
    END;

  BEGIN
    START ;
    RANDOMIZE ;
    CLRSCR ;
    IF  (ANS = 'A') OR (ANS = 'a') THEN ADD ;
    IF  (ANS = 'S') OR (ANS = 's') THEN SUBTRACT ;
    IF  (ANS = 'M') OR (ANS = 'm') THEN MULTIPLY ;
    IF  (ANS = 'D') OR (ANS = 'd') THEN DIVIDE ;
    IF  (ANS = 'Q') OR (ANS = 'q') THEN QUIT ;

end .


LoL that was a dumb math game for a .. well i think it was a final grade or project for my Pascal HS class.. Could you put that into a delphi compiler if Delphi = Pascal? I had a lot of fun writing junk programs in Pascal class.. LoL

ficedula

  • *
  • Posts: 2174
    • View Profile
    • http://www.ficedula.co.uk
Hey
« Reply #29 on: 2004-02-03 20:53:22 »
Delphi is Object Pascal, i.e. Pascal with object orientated bits too ;)  Although I don't know whether your code would actually work in a modern version of Delphi ... you'd need some sort of Crt unit that emulated the old text mode functions ... probably wouldn't be too hard.

But, seriously - those capitals nearly burned my eyes ;)  Been *years* since I've seen Pascal that used capitals like that, reminds me of old BASIC code...

Edit: Tried it - yeah, it does compile, although I had to take out "ClrScr" since the built in functions don't seem to do that; but otherwise, works fine...

dgp9999

  • *
  • Posts: 247
    • View Profile
    • http://molexroots.com
Hey
« Reply #30 on: 2004-02-03 20:56:26 »
I always used Delphi 6 to do my PASCAL assignments. I'd click File | New... then I'd choose Console Application. And there you have it, pascal. Wee. It's much better to look at a Windows box than a blue and yellow Turbo Pascal dos box.

-Dan

Jedimark

  • *
  • Posts: 2056
    • View Profile
Hey
« Reply #31 on: 2004-02-03 21:56:41 »
Quote from: dgp9999

EDIT: 2nd year? We're probably on the same course XD


2nd Year for me too! Never touched Delphi / Pascal though. I know Java inside out though... getting kinda sick of it now!

dgp9999

  • *
  • Posts: 247
    • View Profile
    • http://molexroots.com
Hey
« Reply #32 on: 2004-02-03 22:03:07 »
Oh wait. I'm on my second _course_. The first was National Diploma in Computing (Software). In that I learned the basics of basic and a bit of object-oriented programming in Delphi. I'm now doing the Higher ND (Software) where we'll be doing C, C++ and Java which are basically the same thing so I'm a happy camper ^_^

-Dan

Caddberry

  • *
  • Posts: 1988
    • View Profile
    • http://animenfo.com/
Hey
« Reply #33 on: 2004-02-04 03:00:16 »
Quote from: ficedula
Delphi is Object Pascal, i.e. Pascal with object orientated bits too ;)  Although I don't know whether your code would actually work in a modern version of Delphi ... you'd need some sort of Crt unit that emulated the old text mode functions ... probably wouldn't be too hard.

But, seriously - those capitals nearly burned my eyes ;)  Been *years* since I've seen Pascal that used capitals like that, reminds me of old BASIC code...

Edit: Tried it - yeah, it does compile, although I had to take out "ClrScr" since the built in functions don't seem to do that; but otherwise, works fine...


Cool thats really neat.. Thx fice!

xeriouxi

  • *
  • Posts: 370
    • View Profile
Oops...
« Reply #34 on: 2004-02-04 11:08:43 »
Hi!

I think I might have confused you all... I meant I'm in the second year of A-Levels. I'm not in University yet! Heehee... sorry!  :D

xeriouxi.

DragonMage

  • *
  • Posts: 40
    • View Profile
Hey
« Reply #35 on: 2004-02-06 02:33:12 »
thnx guys your've just put me off programming
 :o

Caddberry

  • *
  • Posts: 1988
    • View Profile
    • http://animenfo.com/
Hey
« Reply #36 on: 2004-02-06 19:37:05 »
Quote from: DragonMage
thnx guys your've just put me off programming
 :o


Hah.. Well i dont even program much.. I cant do anything important with it.. I just mess around sometimes.. I used to be Waay into it before i took a class on it.. LoL go figure.. but seriously its a very deep subject, and you really have to be dedicated i think.

PumpkinPieman

  • *
  • Posts: 256
    • View Profile
    • http://PumpkinPieman.blogspot.com
Hey
« Reply #37 on: 2004-02-10 21:47:59 »
Deticated is right, although it will probally take you a month to get the basics down. :P

Has anyone here done much work with Direct X?

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Hey
« Reply #38 on: 2004-02-11 09:39:57 »
Quote from: PumpkinPieman
Has anyone here done much work with Direct X?

No, don't go that way, use OpenGl. Its portable.

DeadLajik

  • *
  • Posts: 53
    • View Profile
Hey
« Reply #39 on: 2004-02-11 21:23:54 »
Quote
No, don't go that way, use OpenGl. Its portable.


Or there is also SDL (http://www.libsdl.org) which is also very portable and opensource.

sfx1999

  • *
  • Posts: 1142
    • View Profile
Hey
« Reply #40 on: 2004-02-12 03:01:00 »
The libraries may be portable, but is the code?

After all, I tried to get something to compile on MinGW. The Half-life SDK. I had to change so much. Some notable ones were taking variable declarations out of loops and adding &classname:: to every instance of 4 different macros (there were lots). Not to mention when I finally got it to work, I started getting invalid page faults.

Another one that drove me nuts was I wrote a program and found out you could had to make certain #define constants start with a _. I don't know much about programming, though. My book is terrible.

ficedula

  • *
  • Posts: 2174
    • View Profile
    • http://www.ficedula.co.uk
Hey
« Reply #41 on: 2004-02-12 18:38:58 »
There isn't really much point using SDL: in order to do any 3d with it, you have to use OpenGL anyway; you just get SDL to initialise it for you. Which isn't really that good, because it means you can't configure the GL exactly how you might want to. You'd end up doing everything yourself anyway if you were doing any sort of advanced 3d work.

DeadLajik

  • *
  • Posts: 53
    • View Profile
Hey
« Reply #42 on: 2004-02-12 21:03:55 »
ficedula, I agree with you. If you are doing any 3D work you really should just go straight to OpenGL for a couple of reasons.

1) Since SDL is only a wrapper to Direct3D/OpenGL, there is, in theory, a small (really nanoseconds here) amount of time that SDL would add to your execution time. This is because for every high level call you make, SDL has to make equivalent lower level calls.

2) If you are doing 3D work you probably would want to make sure that your code runs at an optimal speed.. which is another reason I guess to work directly with Direct3D or OpenGL.

In my opinion SDL is really just a pretty good wrapper for 2D programming. Especially if your only choices are SDL or going straight to the old DirectDraw interfaces.  If you were looking for say.. a great 2D gaming library I'd recommend Allegro.

Anyways, I don't want to get too offtopic.. so i'll stop here.