Author Topic: What's my variable name?  (Read 4462 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
What's my variable name?
« on: May 05, 2020, 11:07:13 am »
A way to access your variable's name, sort a...

Code: QB64: [Select]
  1. _TITLE "What's my name?" 'b+ 2020-05-05
  2. TYPE var
  3.     name AS STRING
  4.     strg AS STRING
  5.     int AS LONG
  6.     flt AS DOUBLE
  7. DIM clientName AS var, age AS var
  8. clientName.name = "clientName"
  9. age.name = "age"
  10.  
  11.  
  12. INPUT "Hi what's your name? "; clientName.strg
  13. PRINT "How old are you, "; clientName.strg; "?"
  14. INPUT " "; age.flt
  15. PRINT "The variable '"; clientName.name; "' has been set to "; clientName.strg
  16. PRINT clientName.strg; " claims es age is"; age.flt; "as he set the variable '"; age.name; "' to that."
  17.  

FellippeHeitor

  • Guest
Re: What's my variable name?
« Reply #1 on: May 05, 2020, 11:29:31 am »
I understand your trauma of having had your mods to [banned user]'s bits lost in the tantrum, but this feels a bit extreme 😅😅

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: What's my variable name?
« Reply #2 on: May 05, 2020, 11:54:15 am »
I understand your trauma of having had your mods to [banned user]'s bits lost in the tantrum, but this feels a bit extreme 😅😅

Let's keep discussion of people and forum practices in Discussion or Off Topic Boards.

This question has come up before, I've been thinking about it.

This may be an idea worth exploring with code and be helpful in some situations.


« Last Edit: May 05, 2020, 12:01:44 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: What's my variable name?
« Reply #3 on: May 05, 2020, 12:22:21 pm »
Wouldn't if be great if forum software was adaptable? If I had a way to do this at Tapatalk, I would program the boards to place an automatic discussion topic, every time a user posted code in the programs forum. The programs forum would be closed to replies, but if a forum user had reasons to comment on the code, he or she would simply do so in the corresponding discussion thread.

If you guys plan to keep this gig for 10 or so more years, you might want to consider something like this, but it might have to be by policy, if there is no way to manipulate the forum software. At QBF, I can tell you it is a real pain to search programs, because, most of a thread consists of replies, and sometimes you ave to flip 10 or more pages to find where the final revision of the program ended up.

Maybe this topic should be moved to discussions, for further comments?

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: What's my variable name?
« Reply #4 on: May 05, 2020, 12:34:48 pm »
Wouldn't if be great if forum software was adaptable? If I had a way to do this at Tapatalk, I would program the boards to place an automatic discussion topic, every time a user posted code in the programs forum. The programs forum would be closed to replies, but if a forum user had reasons to comment on the code, he or she would simply do so in the corresponding discussion thread.

If you guys plan to keep this gig for 10 or so more years, you might want to consider something like this, but it might have to be by policy, if there is no way to manipulate the forum software. At QBF, I can tell you it is a real pain to search programs, because, most of a thread consists of replies, and sometimes you ave to flip 10 or more pages to find where the final revision of the program ended up.

Maybe this topic should be moved to discussions, for further comments?

Pete

Maybe Pete's post should be moved to discussions.
« Last Edit: May 05, 2020, 12:37:54 pm by bplus »

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: What's my variable name?
« Reply #5 on: May 05, 2020, 12:45:18 pm »
Pete - nice idea - at face value it seems like an automated version of what we've been already shooting for with our curated sections. Not exactly the same, but the spirit is there.

Honestly we probably won't have another [banned user] situation ever again, even if the Hunter himself comes back. Fool me twice, yeah I know... But there is no 3rd time.

Everyone else - let's just get over it. Dan never said a thing I'm gonna remember in the first place. Are we really missing anything here?
You're not done when it works, you're done when it's right.