Message 1 of 8
Sum of local variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I know how to use "while" function until I get to this point.
Here is what I am going to achieve:
(while (/= UserInput "") (setq UserInput (getstring "\nInput: ")) ); end of while
Obviously, the content of user' input and the number of inputs can be anything.
At the end of my code, I'd like to create a local variable "SumOfUserInput":
if the user's inputs are
1) "Input_1" - can be anything
2) "Input_2" - can be anything
3) "Input_3" - can be anything
4) "Input_4" - can be anything
5) "Input_5" - can be anything
…
then the new variable "SumOfUserInput" is expected to pick up all the inputs:
(setq SumOfUserInput (strcat "Input_1" "Input_2" "Input_3" "Input_4" "Input_5" …))
I could not figure it out.
Thanks in advance.
Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²