User Tools

Site Tools


finding_20the_20bbc_20basic_20installation_20directory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

finding_20the_20bbc_20basic_20installation_20directory [2018/03/31 13:19]
127.0.0.1 external edit
finding_20the_20bbc_20basic_20installation_20directory [2018/04/17 16:09] (current)
tbest3112 Added syntax highlighting
Line 2: Line 2:
  
 //by Jon Ripley, May 2006, rewritten February 2008//\\ \\  To find the installation directory of //BBC BASIC for Windows// use the following **FN_ReadBB4WInstallPath** function which takes no parameters and returns a path to where BBC BASIC is installed or an empty string if no installation is found:\\ \\  //by Jon Ripley, May 2006, rewritten February 2008//\\ \\  To find the installation directory of //BBC BASIC for Windows// use the following **FN_ReadBB4WInstallPath** function which takes no parameters and returns a path to where BBC BASIC is installed or an empty string if no installation is found:\\ \\ 
 +<code bb4w>
         DEF FN_ReadBB4WInstallPath         DEF FN_ReadBB4WInstallPath
         LOCAL hkey%,​res%,​lbuf%,​type%,​key$(),​P%         LOCAL hkey%,​res%,​lbuf%,​type%,​key$(),​P%
Line 18: Line 19:
         ENDWHILE         ENDWHILE
         =$$buf%         =$$buf%
 +</​code>​
 \\  Here we check in order of preference three three known registry locations where the BB4W installation path may be stored. The first is an installation path set by recent versions of the install and upgrade tools when they are used. The second is a path to the documentation and the third is a legacy key required to cope with early versions of BBC BASIC for Windows.\\ \\  The following code demonstrates the use of **FN_ReadBB4WInstallPath**:​\\ \\  \\  Here we check in order of preference three three known registry locations where the BB4W installation path may be stored. The first is an installation path set by recent versions of the install and upgrade tools when they are used. The second is a path to the documentation and the third is a legacy key required to cope with early versions of BBC BASIC for Windows.\\ \\  The following code demonstrates the use of **FN_ReadBB4WInstallPath**:​\\ \\ 
 +<code bb4w>
         PRINT "BBC BASIC was installed in: ";​FN_ReadBB4WInstallPath         PRINT "BBC BASIC was installed in: ";​FN_ReadBB4WInstallPath
 +</​code>​
finding_20the_20bbc_20basic_20installation_20directory.txt ยท Last modified: 2018/04/17 16:09 by tbest3112