Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable as a reference or value to a function
#10
When I pass something by value to a function or Sub(procedure), I work with a copy of the variable because I don't want it to change itself.
It doesn't seem to work with a function because the original variable is changed. The result is correct:
eingabe = 5
eingabe = eingabeĀ + 3 -> 8
AlsWert = eingabeĀ + 3 -> 11


[Image: Referenz-Wert-Funktion-QB64.jpg]
Reply


Messages In This Thread
RE: Variable as a reference or value to a function - by Kernelpanic - 07-18-2022, 12:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Function Pointers? BlameTroi 5 262 02-20-2026, 05:55 PM
Last Post: BlameTroi
  Variable length type declarations dano 5 701 08-06-2025, 09:53 PM
Last Post: dano
  Determining if variable or static string is passed to a Sub dano 9 1,242 06-20-2025, 06:31 PM
Last Post: CookieOscar
  Most efficient way to build a big variable length string? mdijkens 9 1,917 01-17-2025, 11:36 PM
Last Post: ahenry3068
  Huge array of variable length strings mdijkens 9 1,864 10-17-2024, 02:01 PM
Last Post: mdijkens

Forum Jump:


Users browsing this thread: 1 Guest(s)