资源描述:
《LotusScript笔记》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、常有函数CBool(0)'printsFALSE0:假,非零:真CDbl(expr)CInt(expr)CLng(expr)CSng(expr)CStr(expr)CVar(expr)ThedatatypeofthereturnvalueisVariant.PrintFormat(9,"0.0;0%")'Output:9.0DimvalueAsIntegervalue=0PrintFormat$(value,"Yes/No")'Output"No"PrintFormat$(value,"On/Off")'Output"Off"PrintFormat$(
2、value,"True/False")'Output"False"value=2PrintFormat$(value,"Yes/No")'Output"Yes"PrintFormat$(value,"On/Off")'Output"On"PrintFormat$(value,"True/False")'Output"True"'DateandTimeformatsx=36525PrintFormat(x,"GeneralDate")'Output:12/31/1999PrintFormat(x,"LongDate")'Output:Friday,Dec
3、ember31,1999PrintFormat(x,"MediumDate")'Output:31-Dec-99PrintFormat(x,"ShortDate")'Output:12/31/99y=123.45PrintFormat(y,"LongTime")'Output:10:48:00AMPrintFormat(y,"MediumTime")'Output:10:48AMPrintFormat(y,"ShortTime")'Output:10:48PrintFormat(2010-11-1512:53:52,"yyyy-mm-dd")'Outp
4、ut:2010-11-15IfconditionThen[statements][Else[statements]]IsArray(expr)IsDate(expr)IsDefined(stringExpr)IsEmpty(expr)IsList(expr)IsNull(expr)IsNumeric(expr)IsObject(expr)LBound(arrayName[,dimension])LCase[$](expr)Left[$](expr,n)Len({stringExpr
5、variantExpr
6、numericExpr
7、typeName})L
8、Trim(stringExpr)Minute(dateExpr)Month(dateExpr)NowPrintFormat(Now(),"LongDate")OnError[errNumber]{GoTolabel
9、ResumeNext
10、GoTo0}Print[exprList]Right[$](expr,n)Second(dateExpr)Split(expressionasString[,delimiterasString[,countasInteger[,compareasInteger]]])asVariantSubInitializeDimr
11、etAsVariantdimteststrasstringDimdelimAsStringteststr="ThisistheConnection"delim=""ret=split(teststr,delim)Forx=0to3Printret(x)NextEndSub'OUTPUT'This'is'the'ConnectionSqr(numExpr)UCase[$](expr)LotusScript语法DimsessionAsNotesSessionSetsession=NewNotesSessionDimdocAsNotesDocumentSet
12、doc=session.DocumentContextDimdbAsNotesDatabaseSetdb=session.CurrentDatabaseDimviewAsNotesViewSetview=db.getView(“v_all_finish”)DimdbOtherAsNotesDatabaseSetdbOthrer=NewNotesDatabase(“,”plan.nsf”)NotesDocumentnotesDocument.UniversalIDvalueArray=notesDocument.GetItemValue(itemName
13、$)SetnotesItem=notesDocument.GetFirstItem(name$