473,785 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

single-letter typecasting macros - where defined ?

jdm
In the sample code for the SortedList class, I see the use of a string
typecasting macro consisting of a single letter "S". i.e.:

Sortedlist->Add(S"Keyval one", S"Item one");

Now I have deduced that the "S" can be replaced with (String __gc *) and the
code will compile and run just fine. But what I can't find is what exactly
Microsoft calls these macros (I have also seen "L" used the same way) and
where they are all documented. I have just spent over an hour endlessly
circling through my vs.net "help" system trying to find them with keywords
such as "typecastin g macros", "string conversion", "data types",
"typecastin g shortcuts", etc to no avail. Just endlessly clicking from one
link to another, only to be presented with yet another screen of Redmond
techno-gobbledygook double speak that says nothing and has no examples.

All I want to know is what all the available single-letter typecasting
macros are, and when to use them. Does such a document exist anywhere in
the millions of lines of pointless verbiage in the Microsoft .Net "Help"
System ?

Nov 16 '05 #1
3 1646
jdm
Many thanks.

"Jeff Partch" <je***@mvps.org > wrote in message
news:ew******** ******@tk2msftn gp13.phx.gbl...
http://msdn.microsoft.com/library/de...us/vclang98/ht
ml/_pluslang_c.2b2 b_.string_liter als.asp http://msdn.microsoft.com/library/de...us/vcmxspec/ht
ml/vcManagedExtens ionsSpec_11_2.a sp --
Jeff Partch [VC++ MVP]

Nov 16 '05 #3
jdm
Yes, thank you for pointing that out. It took me awhile to realize that
they are actully format specifiers much like in the old printf() function of
yore.

"Ken Alverson" <Ke*@Alverson.n et> wrote in message
news:uS******** *****@TK2MSFTNG P10.phx.gbl...
"jdm" <jdm1intx@DIE_S PAMBOT_DIEchart er.net> wrote in message
news:vj******** ****@corp.super news.com...
In the sample code for the SortedList class, I see the use of a string
typecasting macro consisting of a single letter "S". i.e.:

Sortedlist->Add(S"Keyval one", S"Item one");
Do note that things like S"string", L"string", 3.14f, 0x100L, etc are

*not* typecasting. They are actually modifiers that affect the literal value that gets used in your program. Typecasting, by contrast, is generally a runtime operation that takes an existing value (possibly a literal) and converts it into a different type.

Ken

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
5128
by: Dennis Plöger | last post by:
Hi all! I'm currently having some problems parsing a char array in c++. (And yes, I'm a half-newbie ;-)) Perhaps you can help me with this: #include <iostream> using std::cout; void outchar(char *outcharstring)
5
11457
by: Joel | last post by:
Hi, I incorporated a function in my code that whenever I use a string variable in an sql statement if the string contains a single quote it will encase it in double quotes else single quotes. Queston: How do you handle a string that contains both single & double quotes (i.e. 12'X7") Here's the function:
11
535
by: Thom Little | last post by:
I would like three states on an icon ... Left Click Right Click Double Click Left Click is fired at least once on a Double Click Is there a good example that shows how to determine if the user entered a Left Click or a Double Click?
3
3644
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind page, 2) Breakpoint in the Page_Load, 3) debug the web page and click the submit button, 4) "step into" under debug several times, 5) The debugger does not stop at any of the statements in the click event handler. A breakpoint is needed in each...
2
9766
by: John Dann | last post by:
I'm retrieving some columns from a database with numeric values that fall comfortably within the range of the Single type and I'm tempted to use Single for the relevant column type in the retrieved dataset. (Actually the values are held as integers in the database for compact storage but are scaled to their true Single values during retrieval). But I'm sure that I keep reading that there's no performance penalty to using Double rather...
13
4283
by: Kevin Walzer | last post by:
Which of the Windows/Unix package builders for Python applications is capable of creating single-file executables? I'm thinking of: 1. py2exe 2. Mcmillan Installer/PyInstaller 3. cxfreeze The apps I've seen created by py2exe aren't single-file at all, the install folder is full of files besides the main program. I'm looking for a solution that stuffs all libraries, scripts, and the Python
7
12240
by: ashley.ward | last post by:
We have been using VB6 to develop small custom apps that access an Oracle database, in order to extend a larger product that is developed by our colleagues in Germany (who use C++ and Java). As each app is small and simple, we have been distributing each to the customer in the form of a single EXE file. I have been attempting to build another one of these small custom apps, using VB 2005 Express Edition. It doesn't seem to be possible...
3
2743
by: Eric Layman | last post by:
Hi, I've saved data into the db by doing a replace() on single quote. Right now on data display on a datagrid, it shows double single quote. How do I make changes during run time of datagrid so that the double single quote will be replaced as single quote? Pls advise.
2
2886
by: Reporter | last post by:
I got the following example from http://www.evolt.org/article/User_Friendly_Forms_in_PHP/20/60144/index.html : echo '<tr><td>First name:</td><td><input type="text" name="first_name" value="'.htmlspecialchars($_POST).'"></td></tr>'; What purpose do the single quotes serve in value="'.htmlspecialchars($_POST).'" I don't mean the single quotes around first_name. I mean the single
0
8633
by: Atos | last post by:
SINGLE-LINKED LIST Let's start with the simplest kind of linked list : the single-linked list which only has one link per node. That node except from the data it contains, which might be anything from a short integer value to a complex struct type, also has a pointer to the next node in the single-linked list. That pointer will be NULL if the end of the single-linked list is encountered. The single-linked list travels only one...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.