Lines Matching refs:writeln
84 def writeln(self, line): member in KScriptGenerator
88 self.writeln('# ' + comment)
91 self.writeln("")
96 self.writeln("def binary : 1 (x y) y;")
99 self.writeln("extern putchard(x);")
100 self.writeln("extern printd(d);")
101 self.writeln("extern printlf();")
104 self.writeln("def printresult(N Result)")
105 self.writeln(" # 'result('")
106 …self.writeln(" putchard(114) : putchard(101) : putchard(115) : putchard(117) : putchard(108) : pu…
107 self.writeln(" printd(N) :");
108 self.writeln(" # ') = '")
109 self.writeln(" putchard(41) : putchard(32) : putchard(61) : putchard(32) :")
110 self.writeln(" printd(Result) :");
111 self.writeln(" printlf();")
119 self.writeln(" %s = func%d(%s, %s) :" % (LValue, funcToCall, LHS, RHS))
126 self.writeln(" if %s < %s then" % (LHS, RHS))
127 self.writeln(" %s = %s %s %s" % (LValue, LHS, operation, RHS))
128 self.writeln(" else if %s < %s then" % (RHS, LHS))
129 self.writeln(" %s = %s %s %s" % (LValue, LHS, operation, RHS))
130 self.writeln(" else")
131 … self.writeln(" %s = %s %s %f :" % (LValue, LHS, operation, random.uniform(1, 100)))
133 self.writeln(" %s = %s %s %s :" % (LValue, LHS, operation, RHS))
144 self.writeln("def func%d(X Y)" % funcNum)
145 self.writeln(" var temp1 = X,")
146 self.writeln(" temp2 = Y,")
147 self.writeln(" temp3 in")
160 self.writeln(" " + third + ";")
167 …self.writeln("printresult(%d, func%d(%f, %f) )" % (self.lastFuncNum, self.lastFuncNum, arg1, arg2))