Measured Liquid

version 4 by Emily Short

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter: New Units

    Section: Volumes

    Volumes are by default measured in fl oz, fluid ounces; but should we prefer metric measurement, including Metric Units by Graham Nelson will handle all volumes in milliliters/cubic centimeters instead.

    In the event that neither fluid ounces nor milliliters are suitable for a project, or we want to use mL but without committing to Glulx as Metric Units requires, we may safely alter the units of volume however we wish by replacing the relevant section of this extension.

    For instance, if we wanted to go a bit cookery-crazy and use nothing but teaspoons for measurement, we might write:

        Section 1 - Definition (in place of Section 1I - Definition (for use without Metric Units by Graham Nelson) in Measured Liquid by Emily Short)

        A volume is a kind of value. 1 tsp specifies a volume.

        A fluid container has a volume called a fluid capacity. A fluid container has a volume called fluid content. The fluid capacity of a fluid container is usually 50 tsp. The fluid content of a fluid container is usually 0 tsp.

        The sip size is a volume that varies. The sip size is usually 1 tsp.

        The max volume is a volume that varies. The max volume is 2147483647 tsp.

    (Note that our max volume should be 2147483647 of the base unit if we are compiling for Glulx, or 32767 if compiling for the Z-machine, as these are the maximum possible values.)