Recent

Author Topic: Immutable = Pointer?  (Read 613 times)

noszone

  • New Member
  • *
  • Posts: 46
Immutable = Pointer?
« on: February 09, 2023, 10:36:24 am »
Hello,

I have a question. Is Immutable = Pointer? or Immutable = any variable in Pascal?

For instance:

Code: Pascal  [Select][+][-]
  1. var a, b:integer;
  2. begin
  3. a:=2;
  4. b:=a;  //Is b now pointed to a reference or | b now have it's own value copy?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Immutable = Pointer?
« Reply #1 on: February 09, 2023, 10:38:49 am »
Value copy, since a and b are not pointers.

 

TinyPortal © 2005-2018