Thanks Bill

Marc



From: Bill Downall 
Sent: Tuesday, June 08, 2010 3:46 PM
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Re: If (CVAL('VERSION')) > then ....


Marc, 


Jan's advice is good. You can use cval('version') to get the long character 
string, but then it would not be good to use ">=" because you would be 
comparing text strings, not version numbers. Some version names have strings 
like 'eXtreme' in them, and some have 'for Windows' in them. The alphabetical 
order represented by ">=" won't serve you well.


You can use cval('build') or cval('version build') to get a string of the 
numeric version build.  Sorry, I don't have a way any more to see what kinds of 
values get returned by 7.5 or 7.6, but it should be easy to test. 


When I upgraded an installation from 7.6 to 8.0, I put this in an RBASE.DAT 
file, to be sure that if anybody accidentally found or started the obsolete 
version of R:BASE, they got scolded properly, and the application continued 
only if the proper version was running.


------------------------------------
SET VAR vVersion = (cval('version'))
IF vVersion CONTAINS 'v8.' THEN
ENDIF
IF vVersion CONTAINS 'v7.' THEN
  PAUSE 2 USING 'R:BASE 7.6 is offline. Please use R:BASE V-8'
  EXIT
ENDIF
------------------------------------


Whatever you do for a test, anticipate that version build numbers change 
frequently, and be sure your code will stop or continue, (whichever is 
appropriate), the day that you install eXtreme 9.0 (32) or eXtreme 9.0(64).


Bill




On Tue, Jun 8, 2010 at 3:29 PM, MDRD <[email protected]> wrote:

  Hi

  Is there a way to do
  IF (CVAL('VERSION')) >= 7.6 THEN
  or 
  IF (CVAL('BUILD'))  >= ???? THEN

  I only want offices using 7.6 to run a file and I do not want the 7.5 users 
to be able to run this file.


  Thanks
  Marc


Reply via email to