• Welcome to Dark Bit Factory & Gravity.
 

Adding Keywords to VSC 2008 Express

Started by Clyde, January 16, 2010

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Clyde

Hello World,

I wonder if you could help me, I don't suppose any one knows how to add keywords for commands in the express edition of Visual Studio 2008 C++?

Thanks heaps,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Jim

You need to explain a bit more.  Keywords in C are, for instance 'if, while, for' etc.  You can't add any of those.  Commands, I'm not sure what you mean.

Jim
Challenge Trophies Won:

JL235

I presume you mean like adding the C++ equivalent of writing Graphics, Print or LoadImage in Blitz Basic?

If so then this is a misconception about programming languages which you will need to learn. They are not actually keywords, they are just functions. Functions which are supplied with the language and so appear to be built into it. Basic languages call these keywords because they are often included by default. Other langauges tend to place these default functions into a standard library that you include. In Java this library is called the Java API, in C# it's .NET and in C++ it's called Standard Library (or C++ Standard Library).

So to add your own keywords you just define them as functions and then import them (which I suspect might be your next question). Is that what you were after?
Play My Code - build games in your browser!

Clyde

For example, I'd quite fancy having 'ptc_update' with a highlight.
I know how to set the colours for keywords.

I found this information:

Quote from: http://www.highprogrammer.com/alan/windev/visualstudio.html
Add user defined keywords for syntax highlighting

Why can you set a color for user defined keywords in Tools > Options > Format? Where do you set the keywords? Easy, just create usertype.dat in the sharedide/bin directory that Visual Studio is installed in. Put your keywords in that file, one per line.

but I can't find a directory called sharedide/bin
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

rdc

Put usertype.dat in ...\Microsoft Visual Studio.NET\Common7\IDE\

Clyde

Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won: