Go to:  Davar site entry | Site contents | Site index | Personal computer | 4DOS | PowerBASIC | Text bottom

PBER  4DOS  Batch  Command

PBER batch command compiles a procedure (external program executable from the command prompt), and reports the line number within the source text that corresponds to the run-time error address received during program's failed execution.  It "knows" and uses two hardcoded important locations:

%DOS%:\PWRBASIC\PBC   PowerBASIC command-line compiler program EXE module.
%DOS%:\PBASIC Directory with PowerBASIC source procedure.

PBER batch command provides a simplified interface to PowerBASIC post-debugging diagnostic facility of determinig the line number of program statement that caused execution error by the run-time error address.

Demo of PBER command operation can be found below the command text.



:  PBER  Compile to Determine Error Line Number by Addr  11/28/1997-11/28/1997
:  ---------------------------------------------------------------------------
:  Copyright (C) 1997 by Vladimir Veytsel                        www.davar.net

:  1. Name of %DOS%:\PBASIC program to be compiled
:     "?" - Display PBER.BTM script text (Equivalent:  "/").
:  2. Run-time error address.

@ECHO %TR%

 IF %1.==?. .OR. %1.==/. (LIST %_BATCHNAME ^ CLS ^ QUIT)

 IF NOT EXIST %DOS%:\PBASIC\%1.BAS (ECHO %S%%R%Program %DOS%:\PBASIC\%M%%@UPPER[%1].BAS %R%doesn't exist - %M%PBER %R%cancelled%D% ^ QUIT)
 IF %2.==. (ECHO %S%%R%Run-time error address isn't specified - %M%PBER %R%cancelled%D% ^ QUIT)

 PUSHD %DOS%:\PBASIC
 %DOS%:\PWRBASIC\PBC %1 -RE=%2
 POPD
  


Attempt of CONVLNK execution results in error 75 at address 3741.


   Thu  5-08-03 17:49  C:\DAVAR\LINKS> CONVLNK VLAD

   CONVLNK(2.1)  Convert Link List VLAD.TXT into HTML
      100% [*]   ====================================

   Error 75 at pgm-ctr:  3741

PBER command reports that address 3741 within CONVLNK.EXE corresponds to the line number 441 within CONVLNK.BAS.


   Thu  5-08-03 17:49  C:\DAVAR\LINKS> PBER CONVLNK 3741

   PowerBASIC Compiler Version 3.20   Copyright (c) 1989-1995 by Robert S. Zale
   PowerBASIC Inc. *  Carmel, CA, USA
   C:\PBASIC\CONVLNK.BAS
   C:\PBASIC\CONVLNK.BAS(441):  Target address found


View [and save] PBER.BTM text
(Use [Back] button or [Alt]+[CL] to return here from the viewed text)
Copyright © 1997 by
Go to:  Davar site entry | Site contents | Site index | Personal computer | 4DOS | PowerBASIC | Text top