Results 1 to 4 of 4

Thread: how to make writeln write a tpa?

  1. #1
    Join Date
    Jul 2008
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how to make writeln write a tpa?

    i tried this with no prevail

    writeln(Tpointtostr(Color[I]));

    any help please

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    SCAR Code:
    WriteLn(IntToStr(TPA[I].X) + ', ' + IntToStr(TPA[I].Y));

    If you have the latest version of SCAR, you don't need to put IntToStr.
    Last edited by Rich; 09-25-2009 at 06:35 PM.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by R1ch View Post
    If you have the latest version of SCAR, you don't need to put IntToStr.
    Actually, you do need them. You only can leave off the conversion if you're not mixing types, which you are in that case.

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

    Default

    SCAR Code:
    function TPointToStr(t: TPoint): String;
    begin
      Result := '(' + IntToStr(t.x) + ', ' + IntToStr(t.y) + ')';
    end;

    procedure WriteTPA(t: TPointArray);
    var
      i, h: Integer;
    begin
      h := High(t);
      for i := 0 to h do
        Writeln(IntToStr(i) + ' ' + TPointToStr(t[i]));
    end;

    There you have it
    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

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
  •