100分奉上,关于asp中函数为什么不执行。

wbc_58 2002-01-08 05:23:40
在asp中定义了个函数,function createTrueTypeFile(f_words,pfiFileName)。为什么调用时tt=createTureTypeFile(wordsTrueType,tradenum&".pfi")根本不执行。
请各位帮忙分析一下原因。100分奉上。
...全文
94 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
wbc_58 2002-01-08
  • 打赏
  • 举报
回复
呵呵,参数调用错误!
KnowLittle 2002-01-08
  • 打赏
  • 举报
回复
没有return,用call
wbc_58 2002-01-08
  • 打赏
  • 举报
回复
function createTrueTypeFile(f_words1,pfiFileName1)
Response.Write "begin"
on error resume next
' pfipath=Request.ServerVariables("APPL_PHYSICAL_PATH")&"pfiFile\"
pfipath=Server.MapPath(replace(Request.ServerVariables("SCRIPT_NAME"),"dopay1.asp","pfiFile/"))
' Response.Write pfipath
pfiFile=pfipath&"\"&pfiFileName1
on error resume next
dim openmode
openmode=1

set FifCom = Server.CreateObject("ttf2ttf.ttf2ttf")

for i=0 to UBound(f_words1)
' Response.Write fonts(i)&"<br>"
' Response.Write pfipath&"<br>"
' Response.Write f_words(i)&"<br>"
if f_words1(i)<>"" then
pficodes=""
pficharsnum = FifCom.ttftottf(fontsTrueType(i),pfiFile, f_words1(i),"方正补字库", pficodes, FALSE, TRUE, false)
' FifCom.ttftottf("C:\WINNT\Fonts\fzzdsyk.ttf", "D:\网上补字\字库网站\test\fzbu.ttf","方正补字库", ttfcodes, FALSE, TRUE, FALSE)
if openmode=1 then openmode=3
end if
next
' Response.Write "pficodes="&pficodes&"<br>"
if Err.number<>0 then Response.Write Err.description
FifCom=nothing
set fso=createobject("Scripting.FileSystemObject")
createPfiFile=false
if fso.FileExists(pfiFile) then createPfiFile=true
end function
balloy 2002-01-08
  • 打赏
  • 举报
回复
你是不是没有对createTrueTypeFile赋值(即没有createTrueTypeFile = ...一句)
KnowLittle 2002-01-08
  • 打赏
  • 举报
回复
函数的调用写法取决于你这个函数有没有return,(不是指byref这种返回)。
如果有,可以写myResult= myFunc(.....)
如果没有,写成 call myFunc(......)就可以了
treeline.fm 2002-01-08
  • 打赏
  • 举报
回复
我得可以,你怎样调的?
<%@ Language=VBScript %>
<%
function createTrueTypeFile(f_words,pfiFileName)
response.write(f_words)
response.write(pfiFileName)
createTrueTypeFile=20
end function

t2 = "Show"
t1 = createTrueTypeFile("t1",t2&".fre")

%>
buzhidao 2002-01-08
  • 打赏
  • 举报
回复
把函数贴出来
希偌 2002-01-08
  • 打赏
  • 举报
回复
怎么调用?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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