Announcement

Collapse
No announcement yet.

Newbie Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Joe Gucciardo
    replied
    Thanks Everyone. I was able to locate the SCRNIO.INC code on this forum and it did get me past my SCRNIO compile error. Of course, I've encountered another error futher down the line. But I'll try to troubleshoot that on my own. Thanks again.

    Joe

    Leave a comment:


  • Michael Mattias
    replied
    I don't mean to discourage you, Mr. Gucciardo; but changing operating systems and changing compilers (Qprint was born at the very apex of the PB for MS-DOS era) means you ARE going to have to change some things in your inherited program.

    The good news is, it is often far, far easier to accomplish things using the current tools than it was in Ye Olden Dayse.

    Leave a comment:


  • Michael Mattias
    replied
    Another case for "don't just try to port on a verb-for-verb basis"

    I took a look at the "scrnio.inc" file post, and found...

    >Unfortunately, I have found nothing comparable to the QPRINT function yet.
    ...
    Code:
    sub qprint(byval row as long, byval col as long, byval text as string, byval attr as long)
    Then I looked thru the code and you know what qprint does? It prints "text" at "row, column" in color "attr." How does it do it? It converted a bunch of MS-DOS BIOS service calls to Win32 Console API calls. (A pretty remarkable conversion, actually - demonstrating initiative, cleverness and a grasp of both MS-DOS and Windows technologies.)

    But what the procedure actually does is nothing more than....
    Code:
       COLOR
       CONSOLE SET LOC
       PRINT

    So why not just rewrite the qprint function using the instrinsic PB/CC statements?
    Code:
    SUB qPrint (byval row as long, byval col as long, byval text as string, byval attr as long) 
    
      LOCAL fg AS LONG, bg AS LONG
    
       Fg = (something using attr, I forgot all that ms-dos stuff)
       Bg =  ditto
    
       COLOR fg, bg
       CONSOLE SET LOC  col, row
       PRINT   text
    END SUB
    The box thing (qBox)? Forget about it. Too much variation in the treatment of the high-order ASCII characters in the Windows console functions to create something which will reliably reproduce the box-drawing characters on all systems.

    If you really need a box, add a GRAPHIC and use the deviously-named 'GRAPHIC BOX' function.

    News Flash
    There have been a lot of changes in the PB compilers since PB/DOS 2.1.

    Sad to report, but but "qprint for Windows" is as obsolete as buggy whips.

    It's time to drag yourself - kicking and screaming if it must be so, or even if it just feels good - into the 21st century.

    MCM

    Leave a comment:


  • David L Morris
    replied
    I also think that compiled executables, using scrnio.inc, will not work on XP or greater systems.

    Leave a comment:


  • José Roca
    replied
    The distribution of scrnio.inc was dropped from PB distribution set since PBCC 3.0. However, you can find the code in this thread: http://www.powerbasic.com/support/pb...ght=SCRNIO.INC

    Leave a comment:


  • Mel Bishop
    replied
    or add the full path to the #INCLUDE statement.

    Leave a comment:


  • David L Morris
    replied
    Put SCRNIO.INC in the same directory as your C:\STLC\Source\cbs1.BAS file and try to compile again.

    Leave a comment:


  • Joe Gucciardo
    started a topic Newbie Question

    Newbie Question

    I’m a total newbie to Power Basic. I recently inherited an application that I believe ran under Power Basic Console Compiler 2.<something>. I’m using PBCC 4.04. In my first attempt to compile the program, I fail on the following statement:

    #INCLUDE "SCRNIO.INC"
    PowerBASIC Console Compiler
    PB/CC Version 4.04
    Copyright (c) 1998-2007 PowerBasic Inc.
    Venice, Florida USA
    All Rights Reserved

    Error 493 in C:\STLC\Source\cbs1.BAS(139:010): Compiler file not found/accessible
    Line 139: #INCLUDE "SCRNIO.INC"
    ==============================
    Compile failed at 8:40:21 PM on 12/3/2007
    Any help would be appreciated. I know it’s probably a simple answer. Thanks.

    Joe G.
Working...
X