您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > Progress Training
AddMonth2000ProgressTrainingMFG/PROJun,10,2009SoftSpeedConsultantLtd.的使用十三举例讲解标准的报表、维护、查询程序十四Progress的实用编程技巧数据库语言,没有指针没有类也不用搞什么高级接口等(AccessingADatabaseWithProgress)ACCESSDATABASEApplicationCodeOrderEntryUserInterfaceDataDictionaryProcedureEditorUserInterfaceBuilderUpdateAddDel(ProgressModelForDataAccess)DATABASERecordBufferScreenBufferMemoryUserScreenPrinterFile(ProgressStatements)Sample:definevariablecodelikecm_addr.foreachcm_mstrno-lock:displaycm_addr.end.Prompt-forCust:codewithNo-labels.findfirstcm_mstrwherecm_addr=Inputcode.displaycm_addr.foreachso_mstrwhereso_cust=cm_addr:displayso_nbrwith2Columns.foreachsod_detwheresod_nbr=so_nbrno-lock:displaysod_linesod_partsod_qty_ord.end.end.(DatabaseFileTypes).dbDatabaseFileMainDatabase(Data).lgEventlogFileLogFileforDatebase.biBefore-ImageBufferForDatabase.lklockFileLockFileForDatabaseStartup/ShutdowndatabaseWillbeRecordedStoretheTablestructure/Index/Data/Trigger.....TheformatisTXT.IfSystemfails,ItcanbeusetoRestoretheDatabase.LikeBuffertoStoretheDataBeforeWritetoDatabase.Signifiesthatthedatabaseisuse.YoumustdeletetheLockfile,ifsystemfail.(ProgressProgramFileTypes).PProcedureFile.IIncludefile.WUserinterfaceProgram.RCompiledFileAfilethatisincludedinprocedureduringcompilationMainProcedureYouCanDirectlyRunInMFG/PROProgramfilecontainingUserInterfaceelements.eg.DialogBox..CanDirectlyRuninMFG/PROAll.Pfilecancreatecorresponding.RfileSub-ProcedureCallByMainProcedure(InternalAndExternalProcedures)ComparingInternalProcedureExternalProcedureRe-useUseByMainProgramOnlyUsebyAllProgramCode-lengthRelativelyshortAnylengthPerformanceAllocateMemoryNeedstobeLoaded(IncludeFiles).IFileDO:….Displayrecord.End.DO:….Displayrecord.End.MyProg.pMyCode.i(ProgressUIEnvironments)UIEnvironmentEnvironmentFileMSWindowsPROGRESS.INI(\Dlc\Bin)CharacterPROTERMCAPProgress.ini(Progress.svg)DefinethedefaultProgressEnvironment.whenYoustartupProgress.[Fonts][Startup][Propath](ProgressEnvironmentVariables)VariablePointstoPathNameof….DLCProgressInstallDirectoryProcfgConfigurationinformationDirectory(C:/Dlc)PromsgsErrorMessageFile(C:\Dlc)ProPathDirectoryListforProcessSearchesProcedureFile(ProgressPropath)PropathisalistofdirectoriesProgressusestofindProceduresyouinasession.1.EditConfigurefileProgress.ini2.UsingthePropathEditorinPRO*ToolsHowTosetPropath?3.InProgressEditor,AssigntoPropath(DatabaseConnections)WillBeDiscussInProgressAdministrationTrainingGuide(HowtoUseProcedureEditor)KeyFunctionF2HelpF1RunF7NextBufferF9FindShowBufferListMultipleProcedureWindowsCheckingSyntax(HowtoUseCompileProcedure)UsingtheCompilestatmentUsingtheApplicationcompilertoolUsingApplicationToolMFG-UTILCompileProcedure-nameSaveintoDirectory(8)DATE:99/99/99DECIMAL:-,9.99HANDLE:9INTEGER:-,,9LOGICAL:yes/no常量与变量变量必须在第一次被使用之前定义,可以定义在程序的任何地方!但是通常为了增加程序的可读性,变量定义都放在程序的开始处!以下是变量定义的几个实例:definevariablestr01ascharlabelDemoStringinitialhello.defvarstr02likestr01.defvardt01asdateextent5.defvarinte01asinteformat9.说明,第一行:str01是变量名,变量名不要与系统关键字重复,字符或者下划线开头,比如strModel,_Model;char表示变量类型,本例指字符型变量,其它类似的比如integer,date,logical等;label就是后续程序中对变量的描述,比如需要用户输入这个变量值时,系统提示“DemoString;initial变量的初始值常量与变量第二行:def和var都是简写,def是define的简写,var是variable的简写;PROGRESS支持语法简写,但是初学者最好先写全,后面有经验了再简写。like和as的不同点是:as后面直接说明变量类型,而like后面跟另外一个变量或者字段。第三行:extent5,表示该变量是数组变量。第四行:format9变量格式指定变量的格式一个最大的好处就是预留宽度,这个对变量的输入或者报表的输出都很有用的。比如年份的宽度一定是4位的,那么你就可以指定格式format9999。PROGRESS程序每行结束必须有个“.”号!!!“ABC“.AsDatatypeformatformatLikeFieldSample:DefinevariableVar1asdecimaldecimals1labelQty.DefinevariableVar2asCharacterformatx(5).DefinevariableVar3asintegerExtent3.DefinevariableVar4asCharacterFormatQ9Extent4initial[1,2,3,4].DefinevariableVar5aslogicalFormatDetail/SummaryinitialDetail.DataType
三七文档所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
本文标题:Progress Training
链接地址:https://www.777doc.com/doc-5984921 .html