Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are rules for whether or not using ^ to point to value?

Tags:

People also ask

What are the four factors to consider in deciding whether a use of copyrighted material is a fair use?

In determining whether or not a particular use is fair, the law states that at least four factors should be taken into should be taken into consideration: The purpose and character of the use. The nature of the work. The amount and substantiality of the portion used in relation to the work as a whole.

What are the 4 fair use exceptions to copyright?

Since copyright law favors encouraging scholarship, research, education, and commentary, a judge is more likely to make a determination of fair use if the defendant's use is noncommercial, educational, scientific, or historical.

What is the IRR rule?

The internal rate of return (IRR) rule states that a project or investment should be pursued if its IRR is greater than the minimum required rate of return, also known as the hurdle rate. The IRR Rule helps companies decide whether or not to proceed with a project.


Below is a simple example of using pointer in delphi.

Type

TRecord1 = Record
field1 : String;

end; 

procedure TForm1.Button2Click(Sender: TObject);
var
   Rec : TRecord1;
   Ptr: ^TRecord1;

begin
   Rec.field1:= 'field1';
   Ptr := @Rec;
   memo1.Lines.Add (Ptr^.field1); 
   memo1.Lines.Add (Ptr.field1); // it also works.

 end;

In such case, Ptr^ and Ptr both work. It seems delphi is to allow user more flexibility in pointing to the value. But just by reading the two lines, they are syntactically different and may mean differently. In such case both work. But my question is:

  1. how can a user know in other situations where ^ can or can not be omitted or, where with ^ or without ^ means the same or differently?
  2. What are those situations ? Examples will be appreciated.
  3. Why? (Optional)

Thanks a lot in advance.