Update page 'Future P# Versions'
@@ -8,7 +8,6 @@ This document describes an ideas for future versions of P# language specificatio
|
||||
### Data Structures
|
||||
A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths. Data structures can be declared in P# using the following syntax:
|
||||
|
||||
<%
|
||||
struct data {
|
||||
string fname;
|
||||
string lname;
|
||||
@@ -21,7 +20,6 @@ A data structure is a group of data elements grouped together under one name. Th
|
||||
$person1.age = 27;
|
||||
|
||||
$person2 = {fname => 'Andrew', lname => 'Smith', age => 22};
|
||||
%>
|
||||
|
||||
Structure members can be access by using a dot operator (.). The arrow operator cannot be used because a structure is not an object.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user