Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » How to declare a global var without id in *.upt?
Re: How to declare a global var without id in *.upt? [message #3070 is a reply to message #3069] Fri, 05 May 2006 23:29 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
My plan is simple: to generate some classes and methods depending on some entered numbers.
I've quite succeeded but I want to optimize more...

this code below generates: "func0 func1 func2" etc.

id "How many funcs" funcCount="5";

class blabla : staticRectangle {
public: 
<:{ x = ""; lim1=to_number(:funcCount); for(i = 0; i < lim1; i++) x<<"func"<<to_string(i)<<" "; return x; }:>
}


I want x to use like :funcCount somewhere below for other classes.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Esc: how to convert from string to number (or integer)?
Next Topic: Esc: how to use recursion?
Goto Forum:
  


Current Time: Sat May 04 22:42:51 CEST 2024

Total time taken to generate the page: 0.03091 seconds