# Unique multiplication by ten [closed]

People, it's a popularity contest, you have to do somthing cool here.
Think about cool ways of breaking the code in most languages, not about validating for everyting!

Initially this challenge is NOT for esoteric languages. But I didn't disabled them as I expect voters to be fair enough to downvote answers based only on esoteric language syntax uniqueness.

It's not too broad. I thought about code golf tag, but desided that it will be unnessesary limitation for the answers. I expect anwsers to be short and exploiting some language feature.

By the way, I have an interesting solution for VB.NET and it is shorter than 8 chars :)

Write a statement that multiplies the (integer) variable by 10 and assigns result to the same variable. If your language has no integer type, you may assume that the value is an integer not greater then some limit (you can specify this limit yourself, but it defenitly have to be adequate).

The initial and resulting values have to be number. Using string as one of them (or both) is forbidden.

But you don't want the code to be protable, so you are going to write it in such way, that the code is valid for as few programming languages as possible. Ideally in the only language.

Example:

You have variable

int x = 77;


x *= 10;


Declaration is not the part of the answer, only x *= 10; is.
So this code is valid for C, C++, C#, Java, Javascript and probably some other languages.
Just drop a semicolon to cut off C, C++, C# and Java, but VB.NET appears in this case.

Scoring system: it's a popularity contest. For now I'll define the answer score as number of votes, but I'll keep a right to change scoring system by including number of languages into it.

So you have to provide a statement and list of languages (ideally one language) it is valid in.

## closed as too broad by jimmy23013, Addison Crump, TanMath, Toby Speight, Stewie GriffinJan 13 '16 at 10:59

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• And some people just want to watch the world burn. I'd try to come up with a less subjective marking system, though. – Lui Jan 13 '16 at 10:01
• I don't think it's possible to find all languages a program is valid in. – PurkkaKoodari Jan 13 '16 at 10:02
• @Lui, it's popularity-contest ;) If you are ready to provide better scoring system, I'm ready to consider your proposal. – Qwertiy Jan 13 '16 at 10:03
• I'm downvoting because this essentially requires an answer to search through every programming language ever to see whether/how many others have the same behavior. Here's a partial list, for reference. – isaacg Jan 13 '16 at 10:03
• The anti-polyglot idea may work as cops and robbers (polyglots are cracked), but there still is the problem that some languages (esoteric or not) will have a very easy time here. I expect voters to be fair enough to downvote answers based only on esoteric language syntax uniqueness. I don't understand that reasoning at all. The whole point of this challenge is exploiting syntax uniqueness. – Dennis Jan 13 '16 at 15:16

In Perl you can do:

$var .= 0;  because it is not typed. or $var =~ s/\$/0/;


Regex that adds a zero at the end of line.

• Does this code assigns a number to the variable? I trust that you can concatenate numbers, but what the result is? I expect it to be a string, then it's not ok. In this case you need some code to convert it back to number. – Qwertiy Jan 13 '16 at 10:47
• There are no type in Perl, integer and string are stored in same variables. The result for each is 770 – Toto Jan 13 '16 at 11:02

# Vitsy, 2 bytes

a*

Call this method through any normal means (00k or 0m). The top item of the stack will be multiplied by 10 (a in hexadecimal). This is very anti-polyglot because most stack based languages don't have methodology.