J3/99-157r2 Date: 8th June 1999 To: J3 From: Malcolm Cohen Subject: Problems with SELECT TYPE 1. Introduction SELECT TYPE provides type-selection functionality combined with type-safe access to extended components (via the ASSOCIATE clause). To enhance consistency, this construct also accepts non-extensible types, including intrinsic types. Unfortunately, the syntax which we thought handled intrinsic types is slightly broken. 2. The Problem R819 (p176) assumes that intrinsic types have names, as does the example in Note 8.13. However, intrinsic types do not have names; they are accessed by keywords instead. Therefore we must fix the example to use TYPE DEFAULT. Additionally, type aliases have not been taken into account. 3. Edits {Allow the blank between SELECT and TYPE to be omitted, a la SELECT CASE} [28:8+] Add new line "SELECT TYPE". {Add necessary constraint to the use of } [176:33+] Add new constraint "Constraint: shall be a derived type name or a type alias name.". {Allow type aliases in the TYPE IN and TYPE IS statements.} [176:34] Before "." insert "or a type alias name for an extensible type". {Fix mistake} [177:8] Before "type parameters" insert "type," {Fix example} [178:31] Change "IS (REAL)" to "DEFAULT".