From 41bb7cf2d55daa34259a38c4b722a2376e32df2b Mon Sep 17 00:00:00 2001
From: Jonas Franz <info@jonasfranz.software>
Date: Mon, 18 May 2020 20:34:59 +0200
Subject: [PATCH] Use float64 instead of int64

---
 hal/instructions.go      | 4 ++--
 parser/program_parser.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hal/instructions.go b/hal/instructions.go
index 2b89143..627cfec 100644
--- a/hal/instructions.go
+++ b/hal/instructions.go
@@ -7,7 +7,7 @@ import (
 
 type ProgrammedInstruction struct {
 	Instruction *Instruction
-	Operand     int64
+	Operand     float64
 }
 
 func (pi *ProgrammedInstruction) Execute(module *Module) error {
@@ -23,7 +23,7 @@ func (pi *ProgrammedInstruction) Execute(module *Module) error {
 
 type Instruction struct {
 	Name               string
-	ExecuteWithOperand func(module *Module, operand int64)
+	ExecuteWithOperand func(module *Module, operand float64)
 	Execute            func(module *Module)
 }
 
diff --git a/parser/program_parser.go b/parser/program_parser.go
index dcffe0c..861c43e 100644
--- a/parser/program_parser.go
+++ b/parser/program_parser.go
@@ -34,7 +34,7 @@ func parseInstruction(input string) (*hal.ProgrammedInstruction, error) {
 		Instruction: instruction,
 	}
 	if len(args) == 1 {
-		operand, err := strconv.ParseInt(args[1], 10, 64)
+		operand, err := strconv.ParseFloat(args[1], 64)
 		if err != nil {
 			return nil, fmt.Errorf("error while parsing operand for instruction '%s': %v", input, err)
 		}