Topic: Macro command check (1 of 2), Read 12 times
Conf: VEDIT Suggestions
From: Scott Lambert
Date: Wednesday, June 22, 2011 10:37 AM


Vedit is always getting new commands with each version, however not everyone upgrades at the same time, so if one uses a "latest & greatest" command, some users will find it does not work with their old version.

I suggest a command that would enable a macro to find out if a command is available, something like:

com_check("reg_prep")

This would return true if the command reg_prep was available.

This would give the macro programmer the ability to choose to simulate the said command (easy in say the case of the abs or leap_year commands), deactivate the macro feature that requires said command, or post notice that version x.y is required.

If one wanted to get fancy, it could also check for options as well, consider:

com_check("file_open(lock)")

This would confirm that lock was available to the file_open command.

Scott

 


Topic: Macro command check (2 of 2), Read 7 times
Conf: VEDIT Suggestions
From: Pauli Lindgren
Date: Tuesday, June 28, 2011 10:35 AM

On 6/22/2011 10:37:34 AM, Scott Lambert wrote:
>
>Vedit is always getting new
>commands with each version,
>however not everyone upgrades
>at the same time, so if one
>uses a "latest & greatest"
>command, some users will find
>it does not work with their
>old version.
>
>I suggest a command that would
>enable a macro to find out if
>a command is available,
>something like:
>
>com_check("reg_prep")
>
>This would return true if the
>command reg_prep was
>available.
>
>This would give the macro
>programmer the ability to
>choose to simulate the said
>command (easy in say the case
>of the abs or leap_year
>commands), deactivate the
>macro feature that requires
>said command, or post notice
>that version x.y is required.

The macros would become quite complex if you had to check every command before you use them.

But maybe some sort of error handling would be useful.
Perhaps something like ON ERROR on Basic.

Currently, you could simply check the version number.
In order to be able to say "version x.y is required", you would need to know which version is required anyway.

Of course we need a list of versions on which each command was introduced. You could check
http://vedit.com/download/veditlog.txt
but that is not complete. For example, the command Reg_Prep is not mentioned.

(By the way, the commands Date_Day, Date_Month, Date_Year are listed as new commands both for version 6.20.1 and 6.15.4.)
(And version 6.20.2 is not mentioned at all.)

--
Pauli