Wiki page for symbols?

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

Wiki page for symbols?

Postby counting_pine » Mar 15, 2017 22:44

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..

() Array dimensions; function calls; function headers; expression grouping
[] Pointer indexing; string indexing; new[]/delete[]
. 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
_ Line continuation character
; Print expression separator
, Print expression separator; function/maro parameter separator; array dimension separator; ...?
' Single-line comment
/' Begin multiline comment
'/ End multiline comment
'$ Old-style compiler directive
% Integer type suffix
# Double type suffix; file handle signifier; preprocessor statement signifier; preprocessor stringify
## Preprocessor concatenation
$ String type suffix, non-escaped string literal prefix
! Single type suffix; escaped string literal prefix
" String literal container
? Shortcut for Print
+ Operator (addition/concatenation)
* Multiply; dereference
- / \ ^ Misc math operators
+= -= *= etc Misc math self-modifying operators
= Assignment; equality
< > <= >= <> Comparison operators
@ Address of a variable/reference
< > Used after integer-related keywords (e.g. Integer, Uinteger, Cint, Mki, ...) to allow specifiying a bit width

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

Re: Wiki page for symbols?

Postby adele » Mar 16, 2017 12:38

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: 5690
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Wiki page for symbols?

Postby counting_pine » Mar 16, 2017 14:26

Thanks, yes, I forgot about '&'. It can also be used as a Long type suffix, and a prefix for hex/octal/binary numbers.
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: 1439
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Wiki page for symbols?

Postby MrSwiss » Mar 16, 2017 15:45

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

Re: Wiki page for symbols?

Postby counting_pine » Mar 25, 2017 13:33

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

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest