Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Command 1

Status
Not open for further replies.

ariswan2007

Programmer
Jul 26, 2019
9
0
0
ID
Dear expert,
In VF9, when typing a command in the "Command Window Box" or creating a PRG file, the system will type the complete command automatically, for example I type: modi + [spacebar] then the command is automatically typed: modify

How do I turn off the automation, considering that we only need to use 4 command sentences to make the command. Example: modify -> modi, select -> sele, etc.

Thank you for help
 
In VFP from the Tools drop down menu select Intellisense Manager and deselect the 'Enable Intellisense' checkbox.
However enabling Intellisense can speed up typing commands. Eg: for 'modify command' just enter mc and space key and 'modify file' mf + space key etc. Plus you can make your own short cuts in the 'Custom' tab of the Intellisense manager.

 
As you've seen, it is possible to switch off the automatic expansion of command names. But I'm curious as to why you would want to do that?

Since the early days of dBASE (the ancestor of FoxBase and FoxPro), it has been possible to abbreviate most commands to the first four letters - for a good reason. In those early days, computer memory was measured in kilobytes rather than gigabytes, and it took a measurable amount of time to process a word containing, say, eight characters compared to one with just four.

So abbreviating commands to four characters made sense. But there is a cost: readability. For anyone reading - and trying to understand - your code, using REPL in place of REPLACE, or DELE rather than DELETE just adds a layer of unnecessary difficulty. It doesn't matter when you are typing commands directly in the command window, as you are the only one who will ever see them. But it does nothing to improve the readability of code in PRGs or classes and forms.

If you have a good reason for wanting to switch off Intellisense and use the abbreviated commands, by all means do so. But I'm curious to know the reason.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks Mike for the response
Actually there is no specific reason for this "intellisense" question, just want to ask.
Maybe because I usually use four letters for one complete command. The consideration is to make a "simple command" when writing commands in the PRG file or in the form method. With a complete command or just four letters it can run well in VF.9

Hopefully answer, thank you
 
I urge you to leave IntelliSense on for a while and see if you can adjust to it. In the long run, it will almost certainly make you more productive and, if you've been using the 4-letter abbreviations in your actual code, it will make your code much more maintainable.

IntelliSense definitely takes some getting used to, but not when I have to work in an environment without it, it's really annoying. It speeds me up so much.

Tamar
 
Hi,

I second Tamar's advice, even more as there are commands/functions that cannot be abbreviated by 4 letters e.g. SEC()/SECONDS() or AINS()/AINSTANCE() etc. Please do also have a look at the ALanguage() function.

hth

MarK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top