From 11dab96f23d6fe01b75f6d6df1fe6bfa122068e1 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Sat, 8 Feb 2014 13:03:34 +0100 Subject: [PATCH] mjc2wsl - support for array length is now functional in FermaT --- src/mjc2wsl.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java index 67586be..83a84de 100644 --- a/src/mjc2wsl.java +++ b/src/mjc2wsl.java @@ -501,13 +501,8 @@ public class mjc2wsl{ } case arraylength: { prl(createTopEStack()); - // TODO make an array length function of some sort! - prl(createComment( - "array length not known - LENGTH not aplicable to arrays", - C_ERR)); - messages.message("array length not known - LENGTH not aplicable to arrays", TransMessages.M_ERR); - prl(createComment("put 1 on the stack for consistency", C_SPEC)); - prl(createToEStack(1)); + prl("tempb := LENGTH("+ createArray("tempa") + ");"); + prl(createToEStack("tempb")); break; } -- 2.25.1