Results 1 to 2 of 2

Thread: Adding a string var to a string?

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

    Default Adding a string var to a string?

    I know how to add a number (IntToStr(); ) but I'm stumped on how to add a var that is a string to a string.

    Code:
    var
    username: string;
    begin
    username := 'groogie';
    SendKeys( ??? );
    end.
    I was thinking of a few ways but I really need help. I could do this in two ways. The first would be a StrToStr(); function (if one exists) like IntToStr();. The other would be something like this-

    Code:
    var
    groogie: string;
    begin
    username := 'groogie';
    SendKeys(''' + username + ''');
    end.
    But that obviously won't work. I tried putting a backslash in there (like in other languages) but it didn't work. - '\''

    Any help?

  2. #2
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It's actually quite simple.
    SCAR Code:
    program Helper;
    var
      username: String;
    begin
      username := 'Your Username';
      Writeln('Hello ' + username);
    end.
    You simply put a plus sign and the variable.

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

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
  •