Results 1 to 6 of 6

Thread: Need help quick please!

  1. #1
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation Need help quick please!

    Simba Code:
    Function FourNumToTBox(VarName: String; TehCoords: Array [0..3] of Integer): String;
    Begin
      Result:=Writeln(VarName+'.X1:='+IntToStr(TehCoords[0])+';'+VarName+'.Y1:='+IntToStr(TehCoords[1])+';'+VarName+'.X2:='+IntToStr(TehCoords[2])+';'+VarName+'.Y2:='+IntToStr(TehCoords[3])+';');
    End;

    Whats wrong with it? I get type mismatch at the end of the long line.

  2. #2
    Join Date
    Dec 2010
    Posts
    808
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    procedure FourNumToTBox(VarName: String; TehCoords: Array [0..3] of Integer);
    Begin
      Writeln(VarName+'.X1='+IntToStr(TehCoords[0])+';'+VarName+'.Y1='+IntToStr(TehCoords[1])+';'+VarName+'.X2='+IntToStr(TehCoords[2])+';'+VarName+'.Y2='+IntToStr(TehCoords[3]));
    End;

  3. #3
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What did you change?

  4. #4
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    I think he took out Result.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  5. #5
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is what he did! Thank you.

  6. #6
    Join Date
    Dec 2010
    Posts
    808
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry, didn't see this was posted in, yes the result was causing a Type Mismatch, I made your function a procedure and respectively took out Result.

    -Boom

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
  •