Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:22:23+00:00 2026-05-26T23:22:23+00:00

I am trying to do a simple task of appending a number to a

  • 0

I am trying to do a simple task of appending a number to a string multiple times, and hoping that this will build a string.

But it is not working, each call to (string-append ....) seems to do nothing at all.

Here is my code:

(define myString "")
(string-append (number->string 4) myString)
(string-append (number->string 5) myString)
(string-append (number->string 6) myString)
(string-append (number->string 7) myString)
(display myString)

this displays:

“4”

“5”

“6”

“7”

and a blank line for (display myString)

What am I doing wrong?

also if I do it the other way like so it doesn’t work either:

(define myString "")
(string-append myString (number->string 4))
(string-append myString (number->string 5))
(string-append myString (number->string 6))
(string-append myString (number->string 7))
(display myString)

Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:22:23+00:00Added an answer on May 26, 2026 at 11:22 pm

    string-append does not alter an existing string; it returns a new string that is the result of the operation.

    If this seems unusual, consider the addition operator, +. When I write

    3+4

    I’m not changing 3 into 7, just returning the result of the operation.

    So, in your case, if you write

    (define my-string (string-append (number->string 4) (number->string 5)))
    (display my-string)
    

    You should see

    45
    

    To advise you further, it might help to know where you’re heading with this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to accomplish a fairly simple task for my website, but Im not
I have a very simple task I am trying to do in Groovy but
Hey all, this should be a simple task but for some reason i am
This seems like a really simple task, so bear with me. I'm trying to
I'm new to powershell and this question will prove that point. I'm trying a
Trying to perform a very simple task here. I have an <ol> that contains
I'm trying to do something that I think should be fairly simple but I've
I feel this being a simple task, but I don't seem to be able
I thought this would be a relatively simple task with something like FMOD, but
I am trying to complete a seemingly simple task that has turned into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.