File: macro.lua

package info (click to toggle)
sc-im 0.8.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,972 kB
  • sloc: lisp: 32,533; ansic: 19,618; yacc: 1,489; xml: 518; sh: 410; makefile: 307; sed: 4
file content (21 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tmp=sc.lquery("Info from Lua, type in your input: ")
sc.lsetstr(0,0,tmp)  --   Write string from User Query to   A0
sc.lsetstr(1,1,"String From Lua")   -- Write String to B1

for a=10,20,1 do
for b=10,20,1 do

sc.lsetnum(a,b,((a-9)*(b-9)))      -- Set a column and b row some numbers
end
end

sc.lsetform(1,5,"@sum(a5:a7)")     -- write Formula to B5

sc.lsetnum(1,4,sc.maxcols)         -- write maxcolums currently in use to B4


c,r=sc.a2colrow("c5")              -- returns the number representation of "c5" cell should be 3, 5
print("column "..c.." row "..r)
print("        and the asci is "..sc.colrow2a(c,r))     -- show the ascii representation of numeric column row

sc.sc("LET C22=B5*5")              -- pass whole cmd to interpretter.