+ 2

Why there is data type when I can just write doller sign ?

17th Jul 2018, 8:43 PM
Sema Abuel Nour
Sema Abuel Nour - avatar
6 Réponses
+ 3
Sema Abuel Nour I believe php variables automaticaly get assigned datatypes, based on the values. the dollar sign is part of the syntax for declaring a variable.
17th Jul 2018, 11:17 PM
Manual
Manual - avatar
+ 1
Sorry I do not know which language you are refering to. please provide more details and code, to understand your question better.
17th Jul 2018, 9:03 PM
Manual
Manual - avatar
+ 1
I mean php language
17th Jul 2018, 9:14 PM
Sema Abuel Nour
Sema Abuel Nour - avatar
+ 1
I think in C# you can use char.... Is that correct?
18th Jul 2018, 9:23 AM
Valentine Koutekidis
Valentine Koutekidis - avatar
0
Variable name is just a pointer to a certain memory region. Data type tells the interpreter how much memory it should allocate for a variable and how to handle it. E.g 4 bytes in memory can be an integer number, or a string of 4 ASCII chars, or unicode char etc. Or, a+b, depending on a datatype can mean "concatenate strings a and b" or "add integers a and b".
18th Jul 2018, 5:15 AM
Дмитро Іванов
Дмитро Іванов - avatar
0
yes I think so
31st Jul 2018, 6:31 AM
ماهر حمد
ماهر حمد - avatar