Author Topic: BBC BASIC for Windows  (Read 43125 times)

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #30 on: January 17, 2014, 11:48:39 AM »
Richard,

I converted my BBC4W IUP Hello World example to use a BBC4W library. I'm not seeing a IUP created dialog and the BBC4W windows is sitting at a prompt. It basically locks up Wine and I have to manually kill the Wine server to kill BBC4W. My original version using SYS only works fine.

IUP.BBC (IUP BBC4W Library)
Code: [Select]
      REM BBC4W IUP Library
      REM By John Spikowski - 1/16/2014


      DEF PROCiupopen
      LOCAL gpa$, ll%
      gpa$ = "GetProcAddress"
      SYS "LoadLibrary", @lib$+"iup.dll" TO ll%

      SYS gpa$, ll%, "IupOpen" TO IupOpen%
      SYS gpa$, ll%, "IupDialog" TO IupDialog%
      SYS gpa$, ll%, "IupLabel" TO IupLabel%
      SYS gpa$, ll%, "IupAppend" TO IupAppend%
      SYS gpa$, ll%, "IupShow" TO IupShow%
      SYS gpa$, ll%, "IupMainLoop" TO IupMainLoop%
      SYS gpa$, ll%, "IupClose" TO IupClose%

      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCiupclose
      SYS IupClose%
      ENDPROC

      DEF PROCiupshow
      SYS IupShow%
      ENDPROC

      DEF PROCiupmainloop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCiupappend(target%, dest%)
      SYS IupAppend%, dlg%, lbl%
      ENDPROC

      DEF FNiupdialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNiuplabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

HELLO2.BBC
Code: [Select]
      INSTALL @lib$+"IUP"

      PROCiupopen
      win% = FNiupdialog
      label% = FNiuplabel("BBC BASIC for Windows")
      PROCiupappend(win%, label%)
      PROCiupshow
      PROCiupmainloop
      PROCiupclose
« Last Edit: January 17, 2014, 11:51:22 AM by John »

rtrussell

  • Guest
Re: BBC BASIC for Windows - IUP
« Reply #31 on: January 17, 2014, 01:12:51 PM »
My original version using SYS only works fine.

Sounds like you need to compare the working version with the non-working version!  To make that easier I would suggest temporarily copying the library into the 'main program' (you can use File Insert to do that) - that will give you a non-working version that doesn't involve any libraries.

Once you've got a working and a non-working version that both consist of a single source file it should hopefully be easy to see what difference is causing the problem.  The Differences utility (slot 1 in the Utilities menu) may be helpful.

Edit: This looks very suspicious!

Code: [Select]
      DEF PROCiupappend(target%, dest%)
      SYS IupAppend%, dlg%, lbl%
      ENDPROC

Richard.

« Last Edit: January 17, 2014, 01:21:56 PM by Richard Russell »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #32 on: January 17, 2014, 01:26:19 PM »
I compared my original IUP SYS based test (see previous post for code) with what I just posted and I can't see why it doesn't work and locks up Wine.


rtrussell

  • Guest
Re: BBC BASIC for Windows - IUP
« Reply #33 on: January 17, 2014, 01:28:29 PM »
This looks very suspicious!

The Cross-Reference utility (slot 5) would have alerted you to that faulty code.  Here is an edited extract of its report on your library:

Code: [Select]
Cross Reference Utility Report File
Created Fri.17 Jan 2014,21:26:35
....
Warnings:

  Possibly unused variables:
    PROCiupappend():
      target%
      dest%

  Shared variables which are not globals:
   ....
    PROCiupappend():
      IupAppend%
      dlg%
      lbl%

   ....
  Variables which violate naming guidelines:
    PROCiupappend():
      dlg%
      lbl%

Richard.

« Last Edit: January 17, 2014, 01:32:42 PM by Richard Russell »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #34 on: January 17, 2014, 01:33:19 PM »
Code: [Select]
      REM INSTALL @lib$+"IUP"


      DEF PROCiupopen
      LOCAL _%, _hdll%
      SYS "GetModuleHandle", "kernel32.dll" TO _hdll%
      SYS "GetProcAddress", _hdll%, "GetProcAddress" TO _%
      SYS "LoadLibrary", @lib$+"iup.dll" TO _hdll%

      SYS _%, _hdll%, "IupOpen" TO IupOpen%
      SYS _%, _hdll%, "IupDialog" TO IupDialog%
      SYS _%, _hdll%, "IupLabel" TO IupLabel%
      SYS _%, _hdll%, "IupAppend" TO IupAppend%
      SYS _%, _hdll%, "IupShow" TO IupShow%
      SYS _%, _hdll%, "IupMainLoop" TO IupMainLoop%
      SYS _%, _hdll%, "IupClose" TO IupClose%

      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCiupclose
      SYS IupClose%
      ENDPROC

      DEF PROCiupshow
      SYS IupShow%
      ENDPROC

      DEF PROCiupmainloop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCiupappend(target%, dest%)
      SYS IupAppend%, dlg%, lbl%
      ENDPROC

      DEF FNiupdialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNiuplabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

      PROCiupopen
      win% = FNiupdialog
      label% = FNiuplabel("BBC BASIC for Windows")
      PROCiupappend(win%, label%)
      PROCiupshow
      PROCiupmainloop
      PROCiupclose

This combined version give me a runtime message of Not in a FN or PROC. Interesting but not a very help error message.
« Last Edit: January 17, 2014, 04:20:46 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #35 on: January 17, 2014, 01:38:43 PM »
This looks very suspicious!

The Cross-Reference utility (slot 5) would have alerted you to that faulty code.  Here is an edited extract of its report on your library:

Code: [Select]
Cross Reference Utility Report File
Created Fri.17 Jan 2014,21:26:35
....
Warnings:

  Possibly unused variables:
    PROCiupappend():
      target%
      dest%

  Shared variables which are not globals:
   ....
    PROCiupappend():
      IupAppend%
      dlg%
      lbl%

   ....
  Variables which violate naming guidelines:
    PROCiupappend():
      dlg%
      lbl%

Richard.

Good Catch!

It works fine now. Thanks!

rtrussell

  • Guest
Re: BBC BASIC for Windows
« Reply #36 on: January 17, 2014, 01:41:52 PM »
This combined version give me a runtime message of Not in a FN or PROC. Interesting but not a very help error message.
Would you prefer Missing END statement;D

(it would be nice if the error reporting was that intelligent, but sadly it isn't).

Richard.

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #37 on: January 17, 2014, 02:12:48 PM »
After you noticed my error I went back and redid the programs as I initially wrote them. This version doesn't seem to work. Here is the error message that is returned.

No such variable in module C:\BBCWin\lib\IUP

Code: [Select]
      INSTALL @lib$+"IUP"

      PROCIupOpen
      win% = FNIupDialog
      label% = FNIupLabel("BBC BASIC for Windows")
      PROCIupAppend(win%, label%)
      PROCIupShow
      PROCIupMainLoop
      PROCIupClose
      END

Code: [Select]
      REM BBC4W IUP Library
      REM By John Spikowski - 1/16/2014

      gpa$ = "GetProcAddress"
      SYS "LoadLibrary", @lib$+"iup.dll" TO ll%

      SYS gpa$, ll%, "IupOpen" TO IupOpen%
      SYS gpa$, ll%, "IupDialog" TO IupDialog%
      SYS gpa$, ll%, "IupLabel" TO IupLabel%
      SYS gpa$, ll%, "IupAppend" TO IupAppend%
      SYS gpa$, ll%, "IupShow" TO IupShow%
      SYS gpa$, ll%, "IupMainLoop" TO IupMainLoop%
      SYS gpa$, ll%, "IupClose" TO IupClose%

      DEF PROCIupOpen
      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCIupClose
      SYS IupClose%
      ENDPROC

      DEF PROCIupShow
      SYS IupShow%
      ENDPROC

      DEF PROCIupMainLoop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCIupAppend(target%, src%)
      SYS IupAppend%, target%, src%
      ENDPROC

      DEF FNIupDialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNIupLabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

rtrussell

  • Guest
Re: BBC BASIC for Windows - IUP
« Reply #38 on: January 17, 2014, 02:37:00 PM »
After you noticed my error I went back and redid the programs as I initially wrote them. This version doesn't seem to work. Here is the error message that is returned.

Surely the problem is that you never execute the 'library initialisation' code which assigns values to IupOpen% etc?  In an earlier version of the program that initialisation was contained within PROCiupopen but now it appears to be 'dead' code that is sitting in the library but is never called (indeed there is no way of calling it because it isn't in a FN or PROC).

In time you will develop debugging techniques suited to BBC BASIC.  For example if an error message is reported (and no error trapping is in effect) the IDE will highlight the faulty statement in reverse video; in the case of a No such variable error that should tie down the undefined variable to only one or two possibilities, and if in doubt you can open the List Variables window to discover which is the one that wasn't defined.

If the error occurs within a library, as seems to be the case here, there's nothing for the IDE to highlight.  In that case you can either temporarily copy the library into the 'main program' (after the END or QUIT!) or you can use the Module Viewer utility (slot 4) in which case the IDE will be able to highlight the failing statement in the library's tab.

Richard.

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #39 on: January 17, 2014, 02:44:06 PM »
Code: [Select]
      REM BBC4W IUP Library
      REM By John Spikowski - 1/16/2014

      DEF PROCIupOpen
      gpa$ = "GetProcAddress"
      SYS "LoadLibrary", @lib$+"iup.dll" TO ll%
      SYS gpa$, ll%, "IupOpen" TO IupOpen%
      SYS gpa$, ll%, "IupDialog" TO IupDialog%
      SYS gpa$, ll%, "IupLabel" TO IupLabel%
      SYS gpa$, ll%, "IupAppend" TO IupAppend%
      SYS gpa$, ll%, "IupShow" TO IupShow%
      SYS gpa$, ll%, "IupMainLoop" TO IupMainLoop%
      SYS gpa$, ll%, "IupClose" TO IupClose%
      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCIupClose
      SYS IupClose%
      ENDPROC

      DEF PROCIupShow
      SYS IupShow%
      ENDPROC

      DEF PROCIupMainLoop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCIupAppend(target%, src%)
      SYS IupAppend%, target%, src%
      ENDPROC

      DEF FNIupDialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNIupLabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

This works fine. ScriptBasic allows defining constants and global variables to the module outside of the module functions but within the MODULE/END MODULE directives. I think I'm ready to finish the IUP module now. Thanks for all the help getting up to speed with BBC4W.

« Last Edit: January 17, 2014, 04:20:13 PM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #40 on: January 17, 2014, 10:25:06 PM »
I'm trying to test if CALLBACKs work with IUP and BBC4W. I get the following error message when trying to run the code.

No such variable

If I replace the PRINT with PRINT "Got Here". this is the message that is displayed.

Code: [Select]
Got Here

Not in a function

Code: [Select]
      INSTALL @lib$+"CALLBACK"
      INSTALL @lib$+"IUP"

      DEF FNButton_Click(^iup%, mbutton%, mpressed%)
      PRINT "Mouse Button: " + STR$(mbutton%)
      = -2

      PROCIupOpen
      win% = FNIupDialog
      but% = FNIupButton("Click Me")
      PROCIupAppend(win%, but%)
      PROCIupSetCallback(but%, "BUTTON_CB", FN_callback(FNButton_Click(), 3))
      PROCIupShow
      PROCIupMainLoop
      PROCIupClose
      END

Code: [Select]
      REM BBC4W IUP Library
      REM By John Spikowski - 1/16/2014

      DEF PROCIupOpen
      LOCAL gpa$, ll%
      gpa$ = "GetProcAddress"
      SYS "LoadLibrary", @lib$+"iup.dll" TO ll%
      SYS gpa$, ll%, "IupOpen" TO IupOpen%
      SYS gpa$, ll%, "IupDialog" TO IupDialog%
      SYS gpa$, ll%, "IupLabel" TO IupLabel%
      SYS gpa$, ll%, "IupButton" TO IupButton%
      SYS gpa$, ll%, "IupAppend" TO IupAppend%
      SYS gpa$, ll%, "IupShow" TO IupShow%
      SYS gpa$, ll%, "IupMainLoop" TO IupMainLoop%
      SYS gpa$, ll%, "IupClose" TO IupClose%
      SYS gpa$, ll%, "IupSetAttributes" TO IupSetAttributes%
      SYS qpa$, ll%, "IupSetCallback" TO IupSetCallback%
      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCIupClose
      SYS IupClose%
      ENDPROC

      DEF PROCIupShow
      SYS IupShow%
      ENDPROC

      DEF PROCIupMainLoop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCIupAppend(target%, src%)
      SYS IupAppend%, target%, src%
      ENDPROC

      DEF FNIupDialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNIupLabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

      DEF FNIupButton(title$)
      LOCAL btn%
      SYS IupButton%, title$ TO btn%
      = btn%

      DEF PROCIupSetAttributes(iup%, attribstr$)
      SYS IupSetAttributes%, iup%, attribstr$
      ENDPROC

      DEF PROCIupSetCallback(iup%, cbname$, cbfuncaddr%)
      SYS IupSetCallback%, iup%, cbname$, cbfuncaddr%
      ENDPROC
« Last Edit: January 18, 2014, 12:00:28 AM by John »

rtrussell

  • Guest
Re: BBC BASIC for Windows - IUP
« Reply #41 on: January 18, 2014, 02:50:59 AM »
I get the following error message when trying to run the code.

You've got an inline function which consists of more than one line:

Code: [Select]
      DEF FNButton_Click(^iup%, mbutton%, mpressed%)
      PRINT "Mouse Button: " + STR$(mbutton%)
      = -2

Only single-line functions can be inlined, multi-line functions must be positioned after the END or QUIT.  This is a common requirement in BASIC.  Once again I think running the Cross Reference utility would have alerted you to problems in your code.

I don't think the first parameter of FNButton_Click above can be right: you can't specify a pointer (^iup%) as a formal parameter, it doesn't make sense.  You need to be particularly careful not to have errors in callbacks because everything can freeze up if BB4W aborts before it has a chance to return to the caller.

Lastly, it looks from the structure of your program that the callbacks happen within IupMainLoop.  In that case you will need to use the special non-blocking version of SYS when calling that API:

Code: [Select]
      DEF PROCIupMainLoop
      LOCAL dummy%
      SYS FN_syscalln(IupMainLoop%) TO !FN_systo(dummy%)
      ENDPROC

Richard.
« Last Edit: January 18, 2014, 04:34:06 AM by Richard Russell »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #42 on: January 18, 2014, 09:19:47 AM »
Thanks for the tips and direction!

This is the error I'm now getting after the suggested changes were made.

No such variable in module C:\BBCWin\lib\IUP

The cross reference reports are included but due to names being truncated, it's hard to read. (trust)

BUTTON.BAC
Code: [Select]
      INSTALL @lib$+"CALLBACK"
      INSTALL @lib$+"IUP"

      PROCIupOpen
      win% = FNIupDialog
      but% = FNIupButton("Click Me")
      PROCIupAppend(win%, but%)
      PROCIupSetCallback(but%, "BUTTON_CB", FN_callback(FNButtonClick(), 3))
      PROCIupShow
      PROCIupMainLoop
      PROCIupClose
      END

      DEF FNButtonClick(iup%, mbutton%, mpressed%)
      PRINT "Mouse Button: " + STR$(mbutton%)
      = -2

BUTTON.rpt
Code: [Select]
Cross Reference Utility Report File
Created Sat.18 Jan 2014,09:08:54

Main program:

  Functions called:
    FNIupButto  [external]
    FNIupDialo  [external]

  Procedures called:
    PROCIupAppend()  [external]
    PROCIupClose  [external]
    PROCIupMainLoop  [external]
    PROCIupOpen  [external]
    PROCIupSetCallbac  [external]
    PROCIupShow  [external]

  Global variables:
    System variables:
      @lib$
    Integer variables:
      but%
      win%
    Variant variables:
      win

Functions:
  FNButtonClick
Procedures

Warnings:

  Possibly unused variables:
    Main program:
      but%
      win
      win%

  Possibly unused functions or procedures:
    FNButtonClick

End of report.

IUP.BAC (Library)
Code: [Select]
      REM BBC4W IUP Library
      REM By John Spikowski - 1/16/2014

      DEF PROCIupOpen
      LOCAL gpa$, ll%
      gpa$ = "GetProcAddress"
      SYS "LoadLibrary", @lib$+"iup.dll" TO ll%
      SYS gpa$, ll%, "IupOpen" TO IupOpen%
      SYS gpa$, ll%, "IupDialog" TO IupDialog%
      SYS gpa$, ll%, "IupLabel" TO IupLabel%
      SYS gpa$, ll%, "IupButton" TO IupButton%
      SYS gpa$, ll%, "IupAppend" TO IupAppend%
      SYS gpa$, ll%, "IupShow" TO IupShow%
      SYS gpa$, ll%, "IupMainLoop" TO IupMainLoop%
      SYS gpa$, ll%, "IupClose" TO IupClose%
      SYS gpa$, ll%, "IupSetAttributes" TO IupSetAttributes%
      SYS qpa$, ll%, "IupSetCallback" TO IupSetCallback%
      SYS IupOpen%, 0, 0
      ENDPROC

      DEF PROCIupClose
      SYS IupClose%
      ENDPROC

      DEF PROCIupShow
      SYS IupShow%
      ENDPROC

      DEF PROCIupMainLoop
      SYS IupMainLoop%
      ENDPROC

      DEF PROCIupAppend(target%, src%)
      SYS IupAppend%, target%, src%
      ENDPROC

      DEF FNIupDialog
      LOCAL dlg%
      SYS IupDialog% TO dlg%
      = dlg%

      DEF FNIupLabel(title$)
      LOCAL lbl%
      SYS IupLabel%, title$ TO lbl%
      = lbl%

      DEF FNIupButton(title$)
      LOCAL btn%
      SYS IupButton%, title$ TO btn%
      = btn%

      DEF PROCIupSetAttributes(iup%, attribstr$)
      SYS IupSetAttributes%, iup%, attribstr$
      ENDPROC

      DEF PROCIupMainLoop
      LOCAL dummy%
      SYS FN_syscalln(IupMainLoop%) TO !FN_systo(dummy%)
      ENDPROC

IUP.rpt
Code: [Select]
Cross Reference Utility Report File
Created Sat.18 Jan 2014,09:11:02
Main program

Functions:

  FNIupButton():
    Local variables:
      Integer variables:
        btn%
      Variant variables:
        ti
    Shared variables:
      Integer variables:
        IupButton%

  FNIupDialog:
    Local variables:
      Integer variables:
        dlg%
    Shared variables:
      Integer variables:
        IupDialog%

  FNIupLabel():
    Local variables:
      Integer variables:
        lbl%
      Variant variables:
        tit
    Shared variables:
      Integer variables:
        IupLabel%

Procedures:

  PROCIupAppend():
    Shared variables:
      Integer variables:
        IupAppend%
      Variant variables:
        ta

  PROCIupClose:
    Shared variables:
      Integer variables:
        IupClose%

  PROCIupMainLoo:
    Functions called:
      FN_syscalln()  [external]
    Shared variables:
      Variant variables:
        Iu

  PROCIupMainLoo:
    Shared variables:
      Integer variables:
        IupMainLoop%

  PROCIupOpen:
    Local variables:
      Integer variables:
        ll%
      String variables:
        gpa$
    Shared variables:
      Integer variables:
        IupOpen%
      String variables:
        qpa$

  PROCIupSetAttr:
    Shared variables:
      Variant variables:
        IupSetAttribut

  PROCIupShow:
    Shared variables:
      Integer variables:
        IupShow%

Warnings:

  Possibly unused variables:
    FNIupButton():
      IupButton%
      btn%
    FNIupDialog:
      IupDialog%
      dlg%
    FNIupLabel():
      IupLabel%
      lbl%
    PROCIupAppend():
      IupAppend%
      ta
    PROCIupClose:
      IupClose%
    PROCIupMainLoo:
      dummy%
      Iu
    PROCIupMainLoo:
      IupMainLoop%
    PROCIupOpen:
      IupOpen%
      qpa$
    PROCIupSetAttr:
      IupSetAttribut
    PROCIupShow:
      IupShow%

  Possibly unused functions or procedures:
    FNIupButton()
    FNIupDialog
    FNIupLabel()
    PROCIupAppend()
    PROCIupClose
    PROCIupMainLoo
    PROCIupMainLoo
    PROCIupOpen
    PROCIupSetAttr
    PROCIupShow

  Functions or procedures with the same name:
    PROCIupMainLoo
    PROCIupMainLoo

  Shared variables which are not globals:
    FNIupButton():
      IupButton%
    FNIupDialog:
      IupDialog%
    FNIupLabel():
      IupLabel%
    PROCIupAppend():
      IupAppend%
      ta
    PROCIupClose:
      IupClose%
    PROCIupMainLoo:
      Iu
    PROCIupMainLoo:
      IupMainLoop%
    PROCIupOpen:
      IupOpen%
      qpa$
    PROCIupSetAttr:
      IupSetAttribut
    PROCIupShow:
      IupShow%

  Variables which violate naming guidelines:
    PROCIupAppend():
      ta
    PROCIupOpen:
      qpa$

End of report.

« Last Edit: January 18, 2014, 09:25:21 AM by John »

rtrussell

  • Guest
Re: BBC BASIC for Windows - IUP
« Reply #43 on: January 18, 2014, 09:35:40 AM »
The cross reference reports are included but due to names being truncated, it's hard to read.

No idea what's causing the truncation - it doesn't happen in Windows.  If you can't see the bug in your code perhaps a visit to the optometrist is in order, or you can study these sections of the report:   ;)

Code: [Select]
  Possibly unused variables:
    PROCIupOpen:
      qpa$

  Shared variables which are not globals:
    PROCIupOpen:
      qpa$

  Variables which violate naming guidelines:
    PROCIupOpen:
      qpa$

And there's a worrying warning here:

Code: [Select]
  Functions or procedures with the same name:
    PROCIupMainLoop
    PROCIupMainLoop

Take a bit more care!

Richard.
« Last Edit: January 18, 2014, 09:45:37 AM by Richard Russell »

Offline John

  • Forum Support / SB Dev
  • Posts: 3512
    • ScriptBasic Open Source Project
Re: BBC BASIC for Windows - IUP
« Reply #44 on: January 18, 2014, 09:48:18 AM »
Quote
If you can't see the bug in your code perhaps a visit to the optometrist is in order, or you can study these sections of the report:

Cut me some slack. A g and a q look like cousins.  ;D

After that fix, this is the error I'm getting.

No such FN/PROC

Code: [Select]
Cross Reference Utility Report File
Created Sat.18 Jan 2014,09:47:23

Main program:

  Functions called:
    FNIupButton  [external]
    FNIupDialog  [external]

  Procedures called:
    PROCIupAppend()  [external]
    PROCIupClose  [external]
    PROCIupMainLoop  [external]
    PROCIupOpen  [external]
    PROCIupSetCallback  [external]
    PROCIupShow  [external]

  Global variables:
    System variables:
      @lib$
    Integer variables:
      but%
      win%

Functions:
  FNButtonClick()
Procedures

Warnings:

  Possibly unused variables:
    Main program:
      but%

  Possibly unused functions or procedures:
    FNButtonClick()

End of report.