Lecture 4 Flashcards
?
is exactly mnemonic character string used to represent something else.
name
name = ?
Names
identifier
? vary by different languages: foo, foo_bar, foo-name, fooBar, etc
Names
Valid names
?
is a word that is special only in certain contexts.
Names
keyword
?
is a name with fixed purpose
Names
Reserved words
Most newer languages prefer ?.
Names
reserved words
? limitations are different for different languages
Names
Length
?
: maximum of 31 characters
Names - Language examples
FORTRAN 95
?
: no limit but only the first 63 are significant; also, external names are limited to a maximum of 31 characters: maximum of 31 characters
Names - Language examples
C99
?
: no limit and all are significant.
Names - Language examples
C#, Ada, and Java
?
: no limit, but implementers often impose one.
Names - Language examples
C++
?
usually are non-alphanumeric characters
Names
Special Characters
?
all variable names must begin with dollar sign.
Names - Special Characters
PHP
?
all variable names begin with special characters, which specify the variable’s
type
Names - Special Characters
Perl
?
all variable names begin with special characters, which specify the variable’s
type
Names - Special Characters
Perl