PB+CELL5.1如何添加自定义公式!

flyingcell 2003-03-06 10:09:09
//初始化公式
String str
long l

Str = '""WFECS3000公式"" long jldda(string str1,string str2)'
Str = Str + "~n" + " BEGIN_HELP"
Str = Str + "~n" + " jldda(string str1,string str2)"
Str = Str + "~n" + " 本函数演示如何使用缺省参数"
Str = Str + "~n" + " END_HELP"

l = this.object.DefineFunctions(str)

在VB例中有一个VBCRLF的常量,不知在PB中用什么代替,我曾用过空格、~r~n、~n代替都没有用,另外,DefineFunctions()的返回值,什么才是错误的值!

如有成功的案例,请贴段代码,谢谢!
...全文
87 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Cell 2003-03-13
  • 打赏
  • 举报
回复
哈,恭喜.
lihuihit 2003-03-12
  • 打赏
  • 举报
回复
哈哈
flyingcell 2003-03-12
  • 打赏
  • 举报
回复
我算是搞明白了,贴点代码,让用PB的朋友不用再为这个问题头痛,嘿嘿!


//初始化公式
String str

//------------
//原始数据报表
//------------
//01 原始表码_总YSBM_TOTAL(%厂站名称%,%计量点名称%,%数据对应日期时间%,%电量类别%)
//02 原始表码_分时YSBM_TARIFF(%厂站名称%,%计量点名称%,%数据对应日期时间%,%电量类别%,%费率时段%)
str = ''
str = '"WFECS统计函数" Any YSBM_TOTAL( String in_var1 , String in_var2 , String in_var3 , String in_var4 )~r~n' + &
'BEGIN_HELP~r~n' + &
'原型:~r~n' + &
'long ysbm_total(char,char,datetime,char)~r~n~r~n' + &
'输入:~r~n' + &
'厂站名称,计量点名称,数据对应日期时间,电量类别{正向有功(zxyg),反向有功(fxyg),感性无功(gxwg),容性无功(rxwg)}~r~n~r~n' + &
'输出:~r~n' + &
'表码值~r~n~r~n' + &
'示例:~r~n' + &
'ysbm_total(桐梓坡变电站,桐梓坡310,2003-03-01 00:00:00,zxyg)~r~n' +&
'END_HELP'
this.object.DefineFunctions(str)
Cell 2003-03-10
  • 打赏
  • 举报
回复
电话联系过了,解决了吗?

256

社区成员

发帖
与我相关
我的任务
社区描述
其他产品/厂家
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧