User Tools

Site Tools


multi-component-program

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
multi-component-program [2017/04/13 03:32]
barryfp
multi-component-program [2017/06/23 09:34] (current)
barryfp
Line 7: Line 7:
 Inside the //​resources//​ directory create a text file called ''​Tokeniser.dn''​. This file will contain the definition of our interface. Open the file and add the contents: Inside the //​resources//​ directory create a text file called ''​Tokeniser.dn''​. This file will contain the definition of our interface. Open the file and add the contents:
  
-<​code ​dana>+<​code ​d>
 data Token{ data Token{
  char string[]  char string[]
Line 21: Line 21:
 Next we'll write a component that provides (i.e. implements) this interface. Create a new text file in the ''​myproject''​ directory called ''​Tokeniser.dn''​. Open this file and add the contents: Next we'll write a component that provides (i.e. implements) this interface. Create a new text file in the ''​myproject''​ directory called ''​Tokeniser.dn''​. Open this file and add the contents:
  
-<​code ​dana>+<​code ​d>
 component provides Tokeniser { component provides Tokeniser {
    
Line 72: Line 72:
 Next we write the component which will use the tokeniser, and is very similar to our previous tutorial. Create a new text file in the ''​myproject''​ directory called ''​Main.dn''​ and add the contents: Next we write the component which will use the tokeniser, and is very similar to our previous tutorial. Create a new text file in the ''​myproject''​ directory called ''​Main.dn''​ and add the contents:
  
-<​code ​dana>+<​code ​d>
 component provides App requires io.Output out, io.Input stdin, Tokeniser { component provides App requires io.Output out, io.Input stdin, Tokeniser {
   
multi-component-program.txt ยท Last modified: 2017/06/23 09:34 by barryfp