module Balanced_brackets{ // Generate a string with N opening brackets [ and with N closing brackets ], in some arbitrary order. function randomBrackets(max as long) { if max<1 then max=1 def putbracket()=mid$("[[[[]]",random(1,6),1) dim a(random(1, max)) as string<"OK", "NOT OK") until m } Balanced_brackets