Wiki page for symbols?

Forum for discussion about the documentation project.
Post Reply
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Wiki page for symbols?

Post by counting_pine »

I think we should have a wiki page that lists all the possible meanings for symbols come across in code, since they're difficult to search for.
It would be great if we could compile a list of them with their meanings.

Here are the ones I can think of, off the top of my head. Sadly not married up to documentation links..

() (parentheses) Array dimensions; function calls; function headers; expression grouping
[] (square brackets) Pointer indexing; string indexing; new[]/delete[]
{} (braces / squiggly brackets / curly brackets) array initialisation
. (dot/period/full stop) Field access; field access in With blocks; global namespace otherwise
.. global namespace in With blocks
... Ellipsis; used in vararg functions; vararg macros; ...?
-> Field access for pointers
_ (underscore) Line continuation character
; (semicolon) Print expression separator
, (comma) Print expression separator; function/maro parameter separator; array dimension separator; ...?
' (apostrophe, single-quote) Single-line comment
/' Begin multiline comment
'/ End multiline comment
'$ Old-style compiler directive
% (percent sign) Integer type suffix
# (hash) Double type suffix; file handle signifier; preprocessor statement signifier; preprocessor stringify
## Preprocessor concatenation
$ (dollar sign) String type suffix, non-escaped string literal prefix
! (exclamation mark, bang) Single type suffix; escaped string literal prefix
" (double-quote) String literal container
? (question mark) Shortcut for Print
+ (plus) Operator (addition/concatenation)
& (ampersand) Operator (concatenation), integer hex/oct/bin prefix (&H / &O / &B), Long type suffix
* (times, star, asterisk) Multiply; dereference
- / \ ^ (hyphen/dash/minus, slash/forward-slash, backslash, caret/power) Misc math operators
+= -= *= etc Misc math self-modifying operators
= (equals) Assignment; equality
< > <= >= <> (less-than, greater-than, less or equal, greater or equal, unequal) Comparison operators
@ (at-sign) Address of a variable/reference
<N> Used after integer-related keywords (e.g. Integer, Uinteger, Cint, Mki, ...) to allow specifying a bit width

I've almost certainly missed a few symbols, or usage examples.
adele
Posts: 47
Joined: Jun 13, 2015 19:33

Re: Wiki page for symbols?

Post by adele »

Hi,

just to contribute :

& concatenation of strings; automatically stringize numeric arguments for String assignment
=> value assignment ( I didn´t ever use this )
{} array initialization (( Dim array(3) As Integer = { 10, 20, 30, 40 } ))

Adi
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Wiki page for symbols?

Post by counting_pine »

Thanks, yes, I forgot about '&'. It can also be used as a Long type suffix, and a prefix for hex/octal/binary numbers (&H, &O, &B) .
While on the subject of numeric literals, I'll also mention for completeness that '+', '-' and '.' may obviously all be seen in floating-point literal numbers.

It might also be worth flagging up '_', '&', '!', '/ /' for their usage in Print Using.

Also, I forgot the ':', which is used to separate statements, and also to denote bitfields.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Wiki page for symbols?

Post by MrSwiss »

A few more:
Type specifiers C-style like (suffixes):
L, UL, LL, ULL, F, D ...
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Wiki page for symbols?

Post by counting_pine »

True, although they aren't "symbols", they are also difficult to look up in the wiki if you don't know what they mean.
Post Reply