Starting Behavior Basics

Prev Next

Introduction

As long B4P is started with a specified B4P program file, then the program file will start running immediately. If the B4P interpreter is started without a B4P file, then it does the following:

  • Look for "main.b4p" in the current directory (if the B4P interpreter is started from command line)
  • If not successful, then look for "main.b4p" in the starting directory.
  • If still not successful, the interactive mode is started.

If "main.b4p" is found, then B4P waits for 1-2 seconds allowing you to interrupt program execution to force entering into interactive mode directly.

For advanced users: For more details on the starting behavior, see section Starting Behavior Advanced.

What is a Starting Directory

B4P can memorize a starting directory where it will look for "main.b4p" whenever B4P is started without a program file name. Two options are possible:

Using 'start B4P here.b4p'

This file is found in your initial working directory (if enabled during installation process) or in the installation directory. Make a copy of this program into the target directory and run it.

Example Output
B4P - Beyond Former Performance
_______________________________________________________________________________

Version 10.00 Release Candidate 2 (2022-03-27)
Copyright (C) 2012..2022 Georg zur Bonsen, all rights reserved.
Licensing info ...


    When starting, then Beyond4P now looks for 'Main.b4p'
    in the following directory:
    C:\Users\username\Documents\Programs\B4P
Done - Press ENTER key

Using starting directory Function

In interactive mode, enter starting directory("full path name") to specify and memorize the starting directory. For more details, see the B4P function description for starting directory.