TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#FORMAT addition: print character (string) multiple times?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  

Is this a feature that I would like and use?
Yes - I want this.
20%
 20%  [ 1 ]
No - I do not want this.
20%
 20%  [ 1 ]
Don't care - I don't mind either way.
60%
 60%  [ 3 ]
Answer a poll! - Don't bother me with this ****.
0%
 0%  [ 0 ]
Huh? - What are you talking about?
0%
 0%  [ 0 ]
Total Votes : 5

Author Message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Tue Oct 11, 2011 7:45 pm    Post subject: #FORMAT addition: print character (string) multiple times? Reply with quote

I was cobbling together a bargraph display last night and realised I had to use a loop to add each character to a variable to build it up. Is there any merit to the idea of a #FORMAT code that could say take an integer numeric argument and repeat the item that followed it that many times. The most programmatically logical arrangement I could see would either multiple the %item or the literal character following the code (I suggest %X for "multiplication") - this would enable the following sort of action, [with requirement that 0 does not print item at all]:

Code:
#FORMAT {test} {%X%s} {3} {Testing...}
#SHOWME $test
Testing...Testing...Testing...

#VARIABLE status[heath_units] 3
#VARIABLE status[heath_units_max] 8
#FORMAT {test} {Heath: %X#%X_} {$status[heath_units]} {$status[heath_units_max]-$status[heath_units]}
#SHOWME $test
Heath: ###_____

Do others think this would be bloat, or of some use?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group