Assign Description to Variable

Assign Description to Variable - Messages

#1 Posted: 10/24/2022 1:30:58 PM
Arie

Arie

93 likes in 285 posts.

Group: User

Is there a way to assign a description to a variable dynamically?

I am defining variable names dynamically. I would like to also assign a description with each variable name.
Is this possible?

Thanks
File not found.File not found.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#2 Posted: 10/24/2022 2:50:41 PM
churichuro

churichuro

28 likes in 79 posts.

Group: User

I think not, there is the inverse function to what you are looking for...

description("VAR" ) that returns the description of the VAR variable

but it can't be done
description("VAR" ) := "new description"

it's a nice feature to ask for to be implemented in this bidirectional way.
#3 Posted: 10/25/2022 6:44:38 AM
Oscar Campo

Oscar Campo

124 likes in 298 posts.

Group: Moderator

Wrote

Is there a way to assign a description to a variable dynamically?

I am defining variable names dynamically. I would like to also assign a description with each variable name.
Is this possible?

Thanks
File not found.File not found.



A matrix approach:

AssignValueAndDescription.png
AssignValueAndDescription.sm (7 KiB) downloaded 34 time(s).
2 users liked this post
Arie 10/26/2022 9:59:00 AM, Alvaro Diaz Falconi 10/26/2022 2:26:00 PM
#4 Posted: 10/26/2022 9:26:46 AM
Arie

Arie

93 likes in 285 posts.

Group: User

I had another idea using line function. But i'm not sure how to do it programatically... Any Ideas? Is it even possible?

Untitled.png
Worksheet8_alternateIdea.sm (22 KiB) downloaded 23 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
1 users liked this post
⚜ Kenny Lemens, P.E. ᵂᴵ 10/26/2022 10:57:00 AM
#5 Posted: 10/26/2022 9:40:21 AM
Arie

Arie

93 likes in 285 posts.

Group: User

Aha! I figured it out

Untitled.png

I'm pretty happy with this solution.
Here's my updated file for a reference:
Untitled.png

File not found.File not found.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
2 users liked this post
⚜ Kenny Lemens, P.E. ᵂᴵ 10/26/2022 11:32:00 AM, Alvaro Diaz Falconi 10/26/2022 2:29:00 PM
#6 Posted: 10/26/2022 10:31:42 AM
Oscar Campo

Oscar Campo

124 likes in 298 posts.

Group: Moderator

Wrote

Aha! I figured it out



Great!! congrats
  • New Posts New Posts
  • No New Posts No New Posts