Content deleted Content added
m →Array: {{code}} Tag: nowiki added |
m →Other types: cell templates, {{code}} |
||
Line 1,365:
| [[Ada (programming language)|Ada]]<ref name="Ada_RM_2012" />
| <code>type ''name'' is «abstract» «tagged» «limited» ''[''record{{indent|2}}''field{{sub|1}}'' : ''type'';{{indent|2}}''field{{sub|2}}'' : ''type'';{{indent|2}}''...''<br/>end record ''{{pipe}}'' null record'']''</code>
| {{
| {{Any}} combination of records, unions, and enumerations (as well as references to those, enabling recursive types).
| <code>type ''name'' (''variation'' : ''discrete_type'') is record{{indent|2}}case ''variation'' is{{indent|4}}when ''choice_list{{sub|1}}'' =>{{indent|6}}''fieldname{{sub|1}}'' : ''type'';{{indent|6}}''...''{{indent|4}}when ''choice_list{{sub|2}}'' =>{{indent|6}}''fieldname{{sub|2}}'' : ''type'';{{indent|6}}''...''{{indent|4}}''...''{{indent|2}}end case;<br/>end record</code>
|-
Line 1,376:
| [[C (programming language)|C]] ([[C99]])
| rowspan=2| <code>struct ''«name»'' {''type name'';''...''};</code>
| rowspan=2 {{
| rowspan=3 {{
| rowspan=3| <code>union {''type name'';''...''};</code>
|-
Line 1,390:
| <code>(''val{{sub|1}}'', ''val{{sub|2}}'', ''...'' )</code>
|
| rowspan=3 {{
|-
| [[Java (programming language)|Java]]
| {{
|
|
Line 1,399:
| [[JavaScript]]
|
| {{
|
|-
Line 1,427:
|-
| [[Common Lisp]]
|
| rowspan=3| <code>(cons ''val{{sub|1}} val{{sub|2}}'')</code>{{ref|pair only|[c]}}
|
Line 1,433:
|-
| [[Scheme (programming language)|Scheme]]
| {{
|
|
Line 1,444:
| [[Pascal (programming language)|Pascal]]
| <code>record{{indent|2}}''name'': ''type'';{{indent|2}}''...<br/>''end</code>
| {{
| {{
| <code>record{{indent|2}}case ''type'' of{{indent|2}}''value'': (''types'');{{indent|2}}''...''<br/>end</code>
|-
Line 1,461:
|-
| [[Python (programming language)|Python]]
| {{
| <code>«(''»val{{sub|1}}'', ''val{{sub|2}}'', ''val{{sub|3}}'', ''...'' «)»</code>
|
| {{
|-
| [[S-Lang]]
Line 1,479:
|-
| [[PHP]]
| {{
|
|
Line 1,485:
|-
| [[Perl]]
| {{
|
|
| rowspan=3 {{
|-
| [[Raku (programming language)|Raku]]
| {{
|
|
Line 1,516:
| rowspan=2| <code>«(»''val{{sub|1}}'', ''val{{sub|2}}'', ''val{{sub|3}}'', ''...'' «)»</code>
| rowspan=2| <code>type ''name'' = ''Foo'' «of ''type''» {{pipe}} ''Bar'' «of ''type''» {{pipe}} ''...''</code>
| rowspan=4 {{
|-
| [[F Sharp (programming language)|F#]]
Line 1,530:
|-
| [[COBOL]]
| <code>''{{codett|2=cobolfree|level-number name type clauses}}''.{{indent|2}}''{{codett|2=cobolfree|level-number+n name type clauses}}''.{{indent|2}}''...''</code>
| {{
| {{
| <code>''name'' REDEFINES ''variable type''.</code>
|}
|