Value Types
- sizes of standard types (
int,long, ...) are architecture dependent - additional Vala types
int8,int16,int32,int64(signed),uint8,uint16,uint32,uint64(unsigned) with architecture independent guaranteed sizes - no
byte,sbyte(useuint8,int8instead) - no
decimal - C#
charis UCS-2, not Vala'schar, but similar to Vala's UCS-4unichar
Numeric Suffixes
Both Vala and C# support numeric suffixes and are case-insensitive. The following suffixes are supported in Vala:
Integer Suffixes
| Suffix | Type |
|---|---|
| int | |
| u | uint |
| l | long |
| ll | int64 |
| ul | ulong |
| ull | uint64 |
Floating-point Suffixes
| Suffix | Type |
|---|---|
| double | |
| f | float |
| d | double |
Differences between Vala and C#:
- Vala does not support the
msuffix, which represents the decimal type - Vala does not support rearranging the order of the suffix
ulto belu - Vala does not infer the type of
lto be eitherlongorulong - Vala does not infer the type of
uto be eitheruintorulong - Vala does not infer the type of suffixless numbers.
- C# does not have the
ullorllsuffixes.
