Difference between pages "Char" and "File"

From Mesham
(Difference between pages)
Jump to navigationJump to search
m
 
 
Line 1: Line 1:
 
== Syntax ==
 
== Syntax ==
  
Char
+
File
  
 
== Semantics ==
 
== Semantics ==
  
An 8 bit ASCII character
+
A file handle with which the programmer can use to reference open files on the file system
  
 
=== Default typing ===
 
=== Default typing ===
Line 13: Line 13:
 
== Example ==
 
== Example ==
  
  var i:Char;
+
  function void main() {
  var r:='a';
+
    var i:File;
 +
  };
  
In this example variable ''i'' is explicitly declared to be of type ''Char''. Variable ''r'' is declared and found, via type inference, to also be type ''Char''.
+
In this example variable ''i'' is explicitly declared to be of type ''File''.
  
 
''Since: Version 0.41b''
 
''Since: Version 0.41b''
Line 22: Line 23:
 
== Communication ==
 
== Communication ==
  
{{ElementTypeCommunication}}
+
It is not currently possible to communicate file handles due to operating system constraints.
  
 
[[Category:Element Types]]
 
[[Category:Element Types]]
 
[[Category:Type Library]]
 
[[Category:Type Library]]

Revision as of 14:21, 15 April 2013

Syntax

File

Semantics

A file handle with which the programmer can use to reference open files on the file system

Default typing

In the absence of further type information, the following types are added to the chain:

Example

function void main() {
   var i:File;
};

In this example variable i is explicitly declared to be of type File.

Since: Version 0.41b

Communication

It is not currently possible to communicate file handles due to operating system constraints.