Semicolon v ampersand as concatenation delimiter with debug.print
From: Top Spin (ToppSpin_at_hotmail.com)
Date: 11/05/04
- Next message: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Previous message: Bob O`Bob: "Re: Is sp6 still to be avoided?"
- Next in thread: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Reply: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Reply: Bob Butler: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 05 Nov 2004 09:29:27 -0800
The ampersand (&) is a regular operator that will concatenate data of
various types into a string:
q = "abc" & var1 & 123
The semicolon (;) appears to be part of a special syntax used with
Debug.Print that has a similar, but not identical, function:
Debug.Print "abc"; var1; 123
It appears that the ";" also converts any data into a string, but for
numeric data, it also adds a leading space and, except for the first
value, a delimiting space.
Debug.Print 123; 123; 123
results in:
123 123 123
where there is 1 space before the first value and 2 between subsequent
values.
Are there any other rules for this? Is it documented anywhere? (ha-ha)
Thanks
-- Running MS VB 6.0 Pro (SP5) PC: HP Omnibook 6000 OS: Win 2K SP-4 (5.00.2195) Email: Usenet-20031220 at spamex.com (11/03/04)
- Next message: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Previous message: Bob O`Bob: "Re: Is sp6 still to be avoided?"
- Next in thread: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Reply: Ken Halter: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Reply: Bob Butler: "Re: Semicolon v ampersand as concatenation delimiter with debug.print"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|