Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline alyles  
#1 Posted : 24 October 2022 19:30:58(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 277
United States

Was thanked: 91 time(s) in 57 post(s)
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
Worksheet8.pdf (32kb) downloaded 15 time(s). Worksheet8.sm (5kb) downloaded 11 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline churichuro  
#2 Posted : 24 October 2022 20:50:41(UTC)
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 75
Mexico
Location: coah

Was thanked: 27 time(s) in 22 post(s)
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.
Offline oscampo  
#3 Posted : 25 October 2022 12:44:38(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 248
Man
Colombia
Location: Cali, Colombia

Was thanked: 87 time(s) in 66 post(s)
Originally Posted by: alyles Go to Quoted Post
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
Worksheet8.pdf (32kb) downloaded 15 time(s). Worksheet8.sm (5kb) downloaded 11 time(s).


A matrix approach:

AssignValueAndDescription.png
AssignValueAndDescription.sm (8kb) downloaded 5 time(s).
thanks 2 users thanked oscampo for this useful post.
on 26/10/2022(UTC),  on 26/10/2022(UTC)
Offline alyles  
#4 Posted : 26 October 2022 15:26:46(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 277
United States

Was thanked: 91 time(s) in 57 post(s)
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 (23kb) downloaded 1 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 1 user thanked alyles for this useful post.
on 26/10/2022(UTC)
Offline alyles  
#5 Posted : 26 October 2022 15:40:21(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 277
United States

Was thanked: 91 time(s) in 57 post(s)
Aha! I figured it out

Untitled.png

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

Worksheet8_alternateIdea.sm (40kb) downloaded 8 time(s). Worksheet8_alternateIdea.pdf (232kb) downloaded 0 time(s).

Edited by user 26 October 2022 15:49:31(UTC)  | Reason: Not specified

Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
thanks 2 users thanked alyles for this useful post.
on 26/10/2022(UTC),  on 26/10/2022(UTC)
Offline oscampo  
#6 Posted : 26 October 2022 16:31:42(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 248
Man
Colombia
Location: Cali, Colombia

Was thanked: 87 time(s) in 66 post(s)
Originally Posted by: alyles Go to Quoted Post
Aha! I figured it out


Great!! congrats
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.