Cross Reference utility?

Discussions about the BBC BASIC language, with particular reference to BB4W and BBCSDL
Ivan
Posts: 127
Joined: Tue 07 May 2019, 16:47

Cross Reference utility?

Post by Ivan »

Hi,

I'm very pleased with the Cross Reference utility, but I don't understand "[external]"?

Code: Select all

Cross Reference Utility Report File
Created Mon.17 Aug 2020,11:24:21

Main program:

  Procedures called:
    PROC_admin_miniature():
      PROC_miniature()
    PROC_bane  [external]
    PROC_file
    PROC_init
    PROC_init_main
    PROC_main:
      PROC_mus:
        PROC_er_mus_indenfor_margener()
        PROC_flyt_emne():
          PROC_beregn_hjorner()
          PROC_test_omrade()
          PROC_vis_test_omrade()
        PROC_tegn_rektangel()
        PROC_vis_info
      PROC_tastatur:
        PROC_admin_miniature():
          PROC_miniature()
        PROC_side_scroll():
          PROC_bane()
      PROC_vis_info
    PROC_pre_bane:
      PROC_bane()
Procedures actually are in this order:

Code: Select all

PROC_pre_bane:
  PROC_bane()
PROC_file:
PROC_admin_miniature():
  PROC_miniature()
PROC_init_main
PROC_main:
  PROC_mus:
    PROC_er_mus_indenfor_margener()
    PROC_flyt_emne():
      PROC_beregn_hjorner()
      PROC_test_omrade()
      PROC_vis_test_omrade()
    PROC_tegn_rektangel()
    PROC_vis_info
  PROC_tastatur:
    PROC_admin_miniature():
      PROC_miniature()
    PROC_side_scroll():
      PROC_bane()
  PROC_vis_info
Is there any setting, I can use to have this report?

Regards

Ivan
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. C++ in 2021.
RichardRussell

Re: Cross Reference utility?

Post by RichardRussell »

Ivan wrote: Mon 17 Aug 2020, 09:41 I'm very pleased with the Cross Reference utility, but I don't understand "[external]"?
"External" refers to a procedure or function which is called by your program, but is not defined in your program; typically a function in an INSTALLed library. Looking at the report you listed, it seems that the Cross Reference utility believes that PROC_bane() (with one or more parameters) is called but not defined.

A FN/PROC with parameters is entirely independent of a FN/PROC of the same name but without parameters; you can have both in your program and it will not confuse BBC BASIC. Internally this is very similar to the way the scalar variable bane and the array bane() are independent.

It's possible that you have accidentally added a space character between the FN/PROC and the name, or between the name and the opening parenthesis of the parameter list, and it's this that is giving rise to the confusing Cross Reference report.
Ivan
Posts: 127
Joined: Tue 07 May 2019, 16:47

Re: Cross Reference utility?

Post by Ivan »

Thanks for clearing up.
BBC Model B - 1984-1989. 6502 assembler, Unicomal 1988-1994, Some C and C++, Pascal 1990-1994. Bought a copy of BBC-BASIC 2007, but started to program at a daily basis 2019. C++ in 2021.