Announcement

Collapse
No announcement yet.

New PBCC User

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

  • Mark Hunter
    replied
    In the PBCC help file you can go to
    Contents
    ... Appendices
    ...... Appendix B – Upgrading from DOS
    and look it over.
    ----------------------------------------------------------------------

    Every program must have one procedure called
    Code:
    [B][COLOR=DarkOliveGreen]Function PBMain 
    ...
    End Function[/COLOR][/B]
    (or Function WinMain, which requires arguments. See the Help file.)

    This is where execution begins. PBMain can call other procedures. If you place them ahead of PBMain you don’t need to declare them, otherwise you do.
    ----------------------------------------------------------------------

    Change all Integer variable declarations to Long. (Integer will work, but Long is more efficient.)
    ----------------------------------------------------------------------

    Read/Data has been improved. In PBDOS you might write something like this:
    Code:
    [B][COLOR=DarkOliveGreen]Dim a$(5)
    Restore  Foo
    For i = 1 To 5
    ... Read  a$(i)
    Next
    Foo:
    Data “aaa”,  “bb”, “ccc”, “d”, “eeee”[/COLOR][/B]
    In PBCC there’s no Restore command and Read is now a string function. You would do the above as follows:
    Code:
    [B][COLOR=DarkOliveGreen]Dim a$(5)
    For i = 1 To DataCount
    ... a$(i) = Read$(i)
    Next
    Data “aaa”,  “bb”, “ccc”, “d”, “eeee”[/COLOR][/B]
    Read$ uses the Data statements in the same procedure it's in. DataCount is a new keyword that equals how many items total in all the Data statements – in the case above you could use 5 instead.

    Note that Read$ is always a string – there’s no Read without the $. If you want to get numbers use Val, like this:
    Code:
    [B][COLOR=DarkOliveGreen]Dim a(5) as Long
    For i = 1 To DataCount
    ... a(i) = Val(Read$(i))
    Next
    Data 3, 14, 21, 9, 22[/COLOR][/B]
    (You don’t need to put quote marks around the numbers in the Data statements.)
    ----------------------------------------------------------------------

    Def Seg – Replace whatever they do with appropriate API calls.
    ----------------------------------------------------------------------

    Any Screen 12 (graphics) will need to get with the new dispensation. See the Graphic Window, Graphic Attach, etc. instructions.
    Last edited by Gary Beene; 17 Jul 2014, 11:28 PM. Reason: Code: tags

    Leave a comment:


  • David J Walker
    replied
    Paste your code into the PBCC editor & hit the compile button. Fix whatever breaks, search and replace any further instances of it.

    If you have quite a lot of files to do, keep a record of what you fix, after you've done 2 or 3 progs you can use Grep or some such to batch process the rest.

    I converted loads of stuff from QB7 like that, once you get into it it proceeds remarkably quickly.

    Oh, and then test thouroughly!

    Leave a comment:


  • Fred Buffington
    replied
    I posted a page on my website about converting from QB to PBCC.

    Intended to hopefully be included in a PB book which has never come to be.

    It might be helpful. As you probably know QB and PBdos are very similar in
    most syntax.

    http://oasys.earth.prohosting.com/APPENDIXA.htm

    Leave a comment:


  • Jack Kramer
    started a topic New PBCC User

    New PBCC User

    I have just installed PBCC. Currently it's WinXP/PB 3.5 for Dos for me.
    Am not familar with PBCC at all. As a new user I'm very open to advice.
    My first task is convert PB 3.5 for Dos to PBCC

    Feel free to send advice/hints/warnings/shortcuts in my direction.

    Thanks, Jack
Working...
X