ov() - Object view

许多实用脚本和封装函数, 可以让您编写脚本更加便捷高效
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

ov() - Object view

15 Aug 2016, 09:43

Code: [Select all] [Download] GeSHi © Codebox Plus

ov(f,t:="",r:=""){
if !r
r:={&f:1}
else if r[&f]
Return "**"
else r[&f]:=1
for i,n in f
s.="`t" (IsObject(i)?ov(i,t "`t",r):(i+0?(i ""): "`"" i "`"")) "`t:`t" (IsObject(n)?ov(n,t "`t",r):(n+0?(n ""): "`"" n "`"")) ",`n" t
Return (t?("`n" t):"") "{`n" t rtrim(s,"`n`t,") "`t`n" t "}"
}


Image

Return to “脚本函数”

Who is online

Users browsing this forum: No registered users and 1 guest