Author |
Topic |
|
makeshiftwings
New Member
8 Posts |
Posted - Mar 17 2004 : 11:03:50 PM
|
This is a very minor bug, but in earlier versions of Visual Assist, you could include extended ASCII characters in code templates, such as -? . But in Visual Assist X, any extended characters in a code template disappear when it's inserted into a file. |
|
makeshiftwings
New Member
8 Posts |
Posted - Mar 17 2004 : 11:05:43 PM
|
Also, I should add I'm using the 10.0.1221.0 in Visual Studio .NET 2003, in C++ files. |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Mar 17 2004 : 11:16:16 PM
|
But, those extended characters are illegal in C or C++ source code.
I realize that some compilers allow it, but...
|
Joe Pizzi |
|
|
makeshiftwings
New Member
8 Posts |
Posted - Mar 17 2004 : 11:35:36 PM
|
Well, I only use them in comments... actually, the only one i use is the -? for a copyright which goes in a template header at the top of all our files. I *think* it's legal in all compilers to put them in comments, as comments aren't parsed so anything legal for a standard ASCII text file can go in there. |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 18 2004 : 02:31:44 AM
|
...while we're already at it: Auto-Code Template-Suggestion Popup ALWAYS offers two identical entries... For Example: When I type "if", the popup shows two identical "if(-?) { }" entries to chosse from. I think it should just offer one (since both entries are exact the same, couldn't find any differences between them).
|
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Mar 18 2004 : 05:17:00 AM
|
jpizzi: Why do you think those characters are not allowed? I've got the 1990 C spec in front of me. It says: quote: Section 5.2.1. If any other characters [*] are encountered in a source file (except in a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token), the behavior is undefined.
[*] Other than the 92(?) characters required in the source character set, that is.
(Emphasis mine). It also says quote: Section 5.2.1.2: The source character set may contain multibyte characters, used to represent members of the extended character set.
Or am I missing something? |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Mar 18 2004 : 08:58:46 AM
|
Wannabee: Can you look for differences in your Autotext file? |
Whole Tomato Software, Inc. |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 18 2004 : 09:11:40 AM
|
I will when I'm back home... |
|
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 18 2004 : 12:13:54 PM
|
Here you are, found the "bug"
First, this is the suggestion from VA_X:
Now, here you have an excerpt from my Cpp.tpl:
if:
if (-?) {
}
if:
if (-?)
{
}
while:
while (-?) {
}
while:
while (-?)
{
}
for:
for (-?) {
}
for:
for (-?)
{
}
I must confess, I did edit the Cpp.tpl a loooong time ago (in Build 1216 or somewhere around there). I thought VA-X Setup would "detect" my changes and not add those Entries I edited (since it is just one of your "standard" entries slightly edited to my coding-style) again...
But, somehow, it must have entered them, which is not good and results in the shown behaviour...
Any chance for a fix? Or is this just the effect of an outdated Build (with which I edited the TPL) not noticed or found mention-worthy before?
What shall I do to test if this behaviour (adding templates although they are already present in TPL-File but slightly different from "standard" entries) is still there in the newer Setups?
|
|
Edited by - WannabeeDeveloper on Mar 18 2004 12:35:41 PM |
|
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Mar 18 2004 : 12:20:18 PM
|
personally i have started deleting "standard" entries from my current Cpp.tpl file that i dont use. since VAX keeps its list in the latest subdirectory i can always diff the two files and retrieve any i want back at a later date :) |
zen is the art of being at one with the two'ness |
|
|
makeshiftwings
New Member
8 Posts |
Posted - Mar 18 2004 : 5:04:23 PM
|
quote:
Section 5.2.1. If any other characters [*] are encountered in a source file (except in a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token), the behavior is undefined.
[*] Other than the 92(?) characters required in the source character set, that is.
That's true, I forgot you can use them in strings too. As of yet, I haven't had to write a VAX code template that has extended ASCII in a string, but it's not inconceivable, so it would be a good bug to look at. |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Mar 18 2004 : 11:39:48 PM
|
OK. I looked in the C++ standard (14882:1998). It is not nearly as explicit as the C standard (which you quote from), but does contain provision for "universal characters."
In fact, C++ even allows what I refer to as "accented characters" in identifiers.
Learn something new every day...
|
Joe Pizzi |
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Mar 19 2004 : 1:13:33 PM
|
Funny thing: I just took a look at the "CS.TPL" (that's the one for C#, right?)
I never edited that one, cause I don't code in C#, but also there are duplicate entries! In my "CPP.TPL", I thought it was my fault (cause I edited it manually), but I really never ever edited the C#-Templatefile!
if:
if (-?) {
}
if:
if (-?)
{
}
while:
while (-?) {
}
while:
while (-?)
{
}
for:
for (-?) {
}
for:
for (-?)
{
} |
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Mar 19 2004 : 1:21:43 PM
|
They're not duplicates, they have the opening brace in different places, so that you can choose between two common coding styles. |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Mar 19 2004 : 3:21:07 PM
|
Stephen is correct. Templates are different.
Line breaks in templates should appear as funny boxes in suggestion listboxes. Obviously, they do not for Wannabee. Listboxes for us look like this:
We are trying to track down the font used in our suggestion listboxes for Autotext. We get it from the IDE but we cannot yet determine from where the IDE gets it. We are still working on this and plan to have it resolved in build 1222. When done, either we or Wannabee changes the default font.
We tried using \\n for line breaks in listboxes. Ugly. We tried | but no go -- made one think of a caret position. |
Whole Tomato Software, Inc. |
|
|
|
Topic |
|