Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BYVAL in the wiki jumps to DECLARE LIBRARY
#2
It's because the only use of BYVAL is within DECLARE LIBRARY block. It cannot be used with "regular" user subprograms. In other words, when you write a SUB or FUNCTION which doesn't depend on any external library, all parameters without exception are passed by reference. Freebasic has the option to pass parameter by value or by reference, also has "BYREF" but it's more confusing and it's better there to use pointers, which has to be done in Pure Basic as well to change fields part of a structure variable being passed to a "PROCEDURE".
Reply


Messages In This Thread
RE: BYVAL in the wiki jumps to DECLARE LIBRARY - by mnrvovrfc - 12-04-2023, 07:29 PM



Users browsing this thread: 1 Guest(s)