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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:51:19+00:00 2026-06-06T04:51:19+00:00

Is it possible to concatenate a variable to itself a such? @varA: hello ;

  • 0

Is it possible to concatenate a variable to itself a such?

@varA: "hello ";
@varB: "world";

@varA: "@{varA}@{varB}";

(to output “hello world”)

I am able to do this,

@varA: "hello ";
@varB: "world";

@varC: "@{varA}@{varB}";

But something about using the variable in itself seems to break everything. Is this a LESS bug ?

  • 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-06T04:51:21+00:00Added an answer on June 6, 2026 at 4:51 am

    Just installed less to try it out and indeed, trying it the first way I get

    stack_overflowError: Maximum call stack size exceeded in <file>
    1 @varB: "world";
    

    In fact, assigning a variable to itself results in the same error. I have looked around at the source and I can’t say for certain what causes it (although due to the nature of the error, we can guess fairly easily). As far as documentation goes, it mentions that the variables are constants, however after doing some tests, I found that you can in fact define a new variable with the same name as the old one. So:

    @vA = "hi";
    @vA = "hello";
    

    will actually work, and when you use vA later on, it will have a value of “hello”.
    I recommend that you simply use a temporary variable, if you actually find that you need it.

    Just keep @tmp around and use it when you want to, as long as you don’t try to define a new @tmp in terms of itself.

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

Sidebar

Related Questions

I know I can concatenate a variable name using stringwithformat, but is it possible
Is it possible to concatenate variable names in C? Specifically, I have a struct
Possible Duplicate: How to concatenate a number to a variable name in MATLAB? Hi
Possible Duplicates: How to concatenate a number to a variable name in MATLAB? MATLAB:
is it possible to concatenate strings during preprocessing? I found this example #define H
Is it possible to do something like this? var pattern = /some regex segment/
I think this is not possible, but I thought I ask in case there
Possible Duplicate: Concatenate row values T-SQL I have a table like this: ref_num name
Possible Duplicates: Why is lock(this) {...} bad? In C# it is common to use
Possible Duplicate: Finding the Variable Name passed to a Function in C# In C#,

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.