Quote:
Originally Posted by Degree2Code
depends what lang your coding in "Taa-da"
|
No language is like that.
Let's analyze your code.
Code:
class lame {
var poop = 'fruit loop';
function doodoo(flamed){
return flamed;
}
}
lame->doodoo('Topic');
First you have the class lame.
It's correct for Java and C#, but if it's C++ you need };.
Now we're back with 2 languages already which is C# and Java and it doesn't fit to any of it. function is a php keyword.
Code:
var poop = 'fruit loop';
var is a keyword in C#, so now we come up with the result that it's a C# code.
All parameters in C# requires an Identifier, because C# is type-strong.
Also you cannot return a datatype, but a datatype value, so the function is not a valid syntax either in any language.
Code:
function doodoo(flamed){
return flamed;
}
Now what we have back is the method call:
Code:
lame->doodoo('Topic');
-> is used in unsafe context with pointers. Example:
Code:
void something(somedatastruct* data)
{
Console.WriteLine(data->somevalue);
}
' ' is used to define a char. A char can only have one character, so it's not valid either. It would be correct as "Topic".
Other than that nice try.