Results 1 to 12 of 12

Thread: Are pascal and delphi the same thing?

  1. #1
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Talking How do I rotate an object around a point in pascal?

    I posted my code below, but i cant get my small circle to revolve slowly about a point. Can someone please help?







    OLD MESSAGE:I have been seeing the two languages together everywhere, are they the same/related?
    Last edited by g0tp0t; 03-22-2010 at 03:18 AM. Reason: title change

  2. #2
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Related, yes.

    Same, no.

  3. #3
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    pascal and delphi are very similar, but i believe delphi is object based and pascal isnt

  4. #4
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    does that mean i can post here for help with pascal?

  5. #5
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Or here.

  6. #6
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, just make sure you tell people what you are doing/in what language exactly.

  7. #7
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, i am using free pascal and i am trying to make a small circle orbit around a point, this is my code:

    Code:
    Program Graphics;
    Uses Crt, Graph;
      Var GrDriver, GrMode, x: Integer;
          {These vars are needed to initialize the graphics}
          ch : char;
        Begin
        ch := #1;
         ClrScr;
         GrDriver := 0;
         GrMode := 0;
         InitGraph (GrDriver, GrMode, '');
         {InitGraph is used to initialize the graphics mode}
    
         If GraphResult <> 0 Then
             {If an error occurs, print an error message}
          Begin
           WriteLn ('Couldn''t initialize graphics!');
           Halt (0); {This will halt the program}
          End;
    
         while not false do
         begin
         for x:= 1 to 60 do
         clrscr;
         circle(150 + round(sin(x/10)*100),150 + round(cos(x/10)*100),4);
         wait(1000);
         end;
    
         Repeat
          ch := ReadKey;
         Until ch = #27;
         {Repeat until ESC (chr value 27) is pressed}
    
         CloseGraph;
         {CloseGraph is used to clear the graph-memory
         once the program is done.}
    
        End.
    i need the circle to rotate slow enough that i can see it but if i add any delay then it doesnt move at all. i tried wait but that doesnt exist apparently
    Last edited by g0tp0t; 03-22-2010 at 03:01 AM.

  8. #8
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    You have to sleep the thread.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  9. #9
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is that an answer to my code or to my report? lol

    Either way, i dont know how or what that means
    Last edited by g0tp0t; 03-22-2010 at 03:28 PM.

  10. #10
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Try the alias 'sleep' otherwise google fpc wait method.

    Also, fpc is considered object/turbo pascal, it's not the sane as Delphi, but it's not that different either.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  11. #11
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK, so sleep replaces my wait, lol I'm trying that now

    ======

    Okay, I replaced it with sleep(100), but now the circle doesn't appear at all...?

    ======

    Now I took the code I put up here, replaced delay with sleep and got an error saying sleep is an unknown identifier..????
    Last edited by g0tp0t; 03-22-2010 at 07:53 PM.

  12. #12
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Just use delay :P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •