Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Really frustrated by the behavior
Message
From
15/02/2002 15:59:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00620452
Message ID:
00620889
Views:
11
>Dragan,
>
>>It does when you close a method, and also in .prg files if you have the Compile On Save set in your editor options. OTOH, the syntax coloring works as you type - you can see a keyword change colors as you type sufficient number of characters. We've just hit its limitation.
>
>Yeah, but it's still not real-time syntaxing. For example if, in VB, you typed: If < condition > and then hit the enter key, it comes back with a message saying: Expected: Then.

I knew what you meant, that's why I said "syntax coloring", not "checking". OTOH, I never really liked the way VB does it - it checks before you want it; you may want to scroll up and down, find the NameOfAVeryLongVariableWithImpossibleName and paste it - and it will complain before you're finished. In VFP, I simply leave an empty this.whatever=, and go up and down, copy the needed string, and then try to close the method - and the VFP's compiler complains (or complainer compiles?) and gets me straight to the unfinished line.

>Oh yeah, and I think I mentioned this. The problem is that the syntax coloring is being relied on to differentiate comments from those that aren't.

Well, it gives you an opportunity to paint your comments - except that it doesn't agree with VFP on the definition of a comment, so it doesn't fulfill its promise completely.

>>My workaround for this is to write longer comments as just free text, mark it all, and then right click, comment. Easy to uncomment later if I did this with code. This little change of habit saved me from this ever since I discovered this rightclick shortcut.
>
>Mine is to write the comments (without semi-colons) first before I write the code. It gives me an outline of what the method needs to do.

I usually write the Do/Enddo, or If/endif pair first, enter an indented blank line between, and then realize this will not be a three-liner, so I go above the first line of the block and write a comment. A habit which saved me loads of time later, when I was looking for a particular point in code where I'm doing a specific task. Search tools can find your vars, properties, whatever - but they can't find your intentions, unless you state them in the comment.

(damn, I think we (or just I) sound like a couple of retired teachers who watch their language while chatting, lest some acolytes may be listening :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform