Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Programming a version-number check

From   "Mark Schaffer" <>
Subject   st: Programming a version-number check
Date   Sun, 25 Sep 2005 21:59:49 +0100 (BST)

Dear Statalisters:

How would you recommend programming a check for the version number of an
installed ado program?

I have a vague memory of something like this discussed on the list in the
past, but I've checked the Statalist archives for guidance on this and
couldn't find anything, so here goes.

I want to write an ado program that checks to see if another ado is
installed, and if it is, checks the version number.

Checking whether another ado is installed is easy; -findfile- does the
trick easily enough.  But checking the version number is not so
straightforward.  The problem is that -which- sends output with this
information to the screen, but stores nothing that can be easily accessed.

Using -findfile- to get the path to the ado, opening the ado with -file-,
and then messing about with file i/o is unappealing, though I suppose it
could be made to work.  Is there anything easier?


Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3294



This e-mail message is subject to

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index