Zulip Chat Archive

Stream: general

Topic: Way to get fresh variable?


Daniel Donnelly (Aug 28 2019 at 16:12):

Hi, is there a way to get the nearest unused upper-case Latin variable name and if it doesn't exist, then A1, B1, ... and if those are already used then A2, B2, etc?

Daniel Donnelly (Aug 28 2019 at 16:13):

I can handle the indexing and querying from the app, but how does one check that a single variable name does not exist as used already, in any scope that nests the current scope?

Daniel Donnelly (Aug 28 2019 at 16:14):

If it's hard to do or runs too slowly, I can keep track in my app


Last updated: Dec 20 2023 at 11:08 UTC