lotus



previous page: C02) How do I get rid of the warning: "A run-time qualification check will be inserted here"?
  
page up: BETA Programming Language FAQ
  
next page: C04) How do I work around "Repetition of non simple patterns is not implemented" (using v5.0 of the compiler)?

C03) What does that Qua-check warning mean, anyway?




Description

This article is from the FAQ, by with numerous contributions by others.

C03) What does that Qua-check warning mean, anyway?

If you have:

   (# Vehicle: (# ... #);
      Bus: Vehicle(# ... #);
      aVehicle: ^Vehicle;
      aBus: ^Bus
   do ...
      aVehicle[]->aBus[]
      ...
   #)

the compiler will give a Qua-check warning at the "aVehicle[]->aBus[]". The
reason is that aBus can only refer to objects which are instances of a
pattern that is a subpattern of Bus (or is a Bus). But aVehicle may refer to
all objects which are instances of a pattern that is a subpattern of Vehicle
(or is a Vehicle) - that is, not necessarily Bus. The BETA runtime system
therefore inserts a test to verify that the object referenced by aVehicle[]
is actually an instance of a pattern that is a subpattern of Bus (or is a
Bus) - otherwise a runtime error occurs.

The Qua-warning is issued to direct your attention towards these places for
potential runtime errors.

 

Continue to:















TOP
previous page: C02) How do I get rid of the warning: "A run-time qualification check will be inserted here"?
  
page up: BETA Programming Language FAQ
  
next page: C04) How do I work around "Repetition of non simple patterns is not implemented" (using v5.0 of the compiler)?