@psikosen/

GreenyellowLargePayware

Elixir

No description

fork
loading
Files
  • main.exs
  • Test.txt
main.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
list = [:text,:flex, :blex]

defmodule Master do
  def sain(a) do
    IO.puts('Works') 
    a
  end
end

defmodule T.Status do 
  
  def writeFile() do
      File.write('Test.txt','nmreated')
      File.close('Test.txt');
  end
  
  def readFile() do
      red = File.read('Test.txt')
      IO.inspect(red)
      {a,b} = red
      IO.inspect(b)
      File.close('Text.txt')
  end
  def spawnProcess() do
      pid = spawn fn-> 1 + 2 end
  end
end

defmodule Math do
  def sum(a, b) do
    a + b
   end
end

IO.puts(Math.sum(1,2))
IO.inspect(list)

Master.sain(2)

T.Status.writeFile()
T.Status.readFile()

s = T.Status.spawnProcess()
pid = Process.alive?(s)

IO.inspect(s)
IO.inspect(pid)