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 9140283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:29:45+00:00 2026-06-17T09:29:45+00:00

More often than not I get characters like {\\ { in my list which

  • 0

More often than not I get characters like “{\\ {” in my list which is the result of simple list which is concatenated or split by space .

Just looking for the reason behind these characters.

I know that the backspace followed by a special sign can be ignored from the equation but
what does \\ mean ?

  • 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-06-17T09:29:46+00:00Added an answer on June 17, 2026 at 9:29 am

    A long time ago, everything in Tcl was stored internally as a string, including lists. Whitespace was chosen to separate list elements so they could be distinguished from each other later…

    set planets [list "mercury" "venus" "march"] ;# stored in planets as "mercury venus march"
    puts [lindex $planets 2] ;# lindex treats it's first (string) argument as a list, and splits on whitespace to find the third element
    

    …but then some way to escape/quote whitespace characters was needed to be able to store these in the actual list elements. { and } were used for this…

    set programs [list "hello world" "primes"] ;# stored in programs as "{hello world} primes"
    

    …and now you need to be able to escape { and }, etc.

    In modern Tcl versions, lists are stored more efficiently internally, but from the script writers point of view it’s still stored that way for backwards compability and maybe for other reasons. So when you use a list as a string, you get this string representation of the list, with spaces, braces and backslashes.

    The simple solution to your question is to never treat a list as a string, i.e. don’t send a list as an argument where the command expects a string. Then you’ll never see any special escape sequences unless you actually put them in an element.

    puts $mylist ;# bad unless used for debugging
    puts [join $mylist] ;# good
    

    And don’t treat strings as lists either:

    set mystring "word1 {hello word3"
    puts [lindex $mystring 1] ;# will throw an error
    puts [lindex [split $mystring] 1] ;# good
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have settings dialog with a number of ComboBoxes. More often than not, these
More often than I like when designers edit some of our sites' pages, they
I am launching a java jar file which often requires more than the default
More often than I'd have hoped I seem to come across method/property definitions in
Code is read more often then updated. Writing more readable code is better than
I've been using debug() more often now, but sometimes I wonder which functions have
using Tweepy in my app, I get this Exception very often, just after sending
I feel like I'm doing this wrong, or it's just a result of my
I check RSS feeds more often than I should, so I built an application
I have been coming across these two words more often but i didn't see

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.