ImageVerifierCode 换一换
格式:PDF , 页数:377 ,大小:16.87MB ,
资源ID:435486      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-435486.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ANSI INCITS 113-1987 Information Systems - Programming Languages - Full BASIC (Supplement A - 1989).pdf)为本站会员(visitstep340)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ANSI INCITS 113-1987 Information Systems - Programming Languages - Full BASIC (Supplement A - 1989).pdf

1、for Informations Systems - Programming Languages - Modules and Individual Character kNSI INCITS 113a-1989 (R2003) (formerly ANSI X3.113a-1989 (R1998): for Full Basic Input Developed by Where IT all begins ANSI X3.113a-1989 Supplement to ANSI X3 113-1 989 I American National Standard I for informatio

2、n systems - programming languages - modules and individual character input for full BASIC Approved July 26,1989 Secretariat: Computer and Business Equipment Manufacturers Association Page 1 of 14 pages 1. Introduction This Addendum is designed to promote the interchangeability of BASIC programs amon

3、g a variety of automatic for example, a module may provide for additional mathematical functions from which programs may access the ones needed and ignore the rest. Finally, modules could be used to add functional enhancements to BASIC; for example, a full GKS binding could be pro- vided to BASIC us

4、ing modules. 18.2 Syntax 1. program 2. module-part 3. module-def program-name-line? main-program = remark-line* module-def = module-line module-header procedure-part* (procedure-part I module-part)* remark-line* end-module-line ANSI X3.113a-1989 Page 6 of 14 pages 4. module-line 5. module-statement

5、6. module-name 7. module-header 8. module-header-line 9. public-line 10. public-statement 11. global-type 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. function-type sub-type picture-type share-line share-statement channel-type channel-list module-option-line module-option-statement end-module

6、-line end-module-statement type-declaration external-share-type 25. qualifred-id-list 26. qualifred-id 27. numeric-identifier 28. string-identifier 29. subprogram-name 30. picture-name 31. line 32. declaration-line 33. dim-line line-number module-statement tait MODULE module-name routine-identifier

7、(remark-line I public-line)* (remark-line I share-line)* module-header-line* remark-line I declaration-line I dim-line I module-option-line I block line-number public-statement tail PUBLIC global-type nweric-type I string-type l function-type I sub-type I picture-type ECTNCTION function-list PICRE p

8、icture-name-list line-number share-statement tail SHARE (global-type I channel-type) CHANNEL channel-list channel-number ( comma channel-number )* line-number module-option-statement tail MODULE option-statement line-number end-moduk-statement tail END MODULE external-share-type EXTERNAL (FUNCTION /

9、 SUB / PICTURE / NUMERIC / STRING) qualifred-id-list qualifred-id (comma qualifred-id)* module-name period (defrned-junction I routine-identifier I simple-nwneric-variable I simple-string-variable I formal-array) module-name period letter identifrer-character* module-name period letter identifrer-ch

10、aracte fl dollar-sign module-name period routine-identifier module-name period routine-identifrer public-line I share-line I module-line I module-option-line I module-header-line I end-module-line I dim-line I declaration-line line-number declaration-statement tail line-number dim-statement tail SUB

11、 sub-list A given identijer shall not appear more than once in the union of the public-statements, share-statements, declare-statements with the numeric-type, and the dimension-statements in the module-header of a given module- def. A given identijer shall not appear more than once in the union of t

12、he public-statements, share-statements, declare-statements with the string-type, and the dimension-statements in the module-header of a given module-def. A given identifier shall not appear more than once in the union of the public-statements, share-statements, and declare-statements with the functi

13、on-type in the module-header of a given module-def. A given identifier shall not appear more than once in the union of the public-statements, share-statements, and declare-statements with the sub-type in the module-header of a given module-def. ANSI X3.113a-1989 Page 7 of 14 pages A given identijer

14、shall not appear more than once in the union of the public-statements, share-statements, and declare-statements with the picture-type in the module-header of a given module-def. A given channel-number shall not appear more than once in the union of the share-statements with the channel- type in the

15、module-header of a given module-def. An identifier that appears in apublic-statement of a given module-def shall not also appear in an external-share- type in that module-def. A variable or routine whose identifier appears in apublic-statement shall be accessible: from the main-program, or from any

16、external-proc-def, or from any other module-def associated with the muin-program, provided that such main-program, external-proc-defs, or other associated module-defS shall contain a declare-statement with an external-shure-type containing a reference o that variable or routine. A variable or routin

17、e whose identifier appears in a public-statement or shure-statement shall be accessible from within the module-de$ including the module-header and all external-proc-defs in the module-de5 without further declaration. A channel-number that appears in a share-statement shall be accessible from within

18、the module-de$ including the module-header and all external-proc-defs in the module-def. A variable whose identifier, or a channel whose channel-number does not appear in either apublic-statement or share-statement shall be accessible only from within the module-header. A module-header shall contain

19、 at most one ANGLE option, at most one ARITHMETIC option, at most one COLLATE option, and at most one BASE option. If a module-header contains a MODULE OPTION statement of a given type, then no OPTION statement of that type may appear in the module-header or in any external-procedure in that module-

20、def. If an external-procedure in a module-def accesses a numeric share-identifier orpublic-identifier in that module- def, then the ARITHMETIC options of that external-procedure and the module-header shall be the same. If an external-procedure in a module-def accesses a string share-identifier or pu

21、blic-identifier in that module-def, then the COLLATE options of that external-procedure and the module-header shall be the same. A qualifred-id appearing in an external-share-type containing the keyword FUNCIION shall contain a dejned- function that refers to a defined-function that appears in apubl

22、ic-statement in the module-def named in the qualijied-id. A qualified-id appearing in an external-share-type containing the keyword SUB shall contain a routine-identijer that refers to a subprogram-name that appears in apublic-statement in the module-def named in the qualified-id. A qualified-id app

23、earing in an external-share-type containing the keyword PICTURE sha contain a routine- identijer that refers to apicture-name that appears in a public-statement in the module-defnamed in the qualified-id. A qualified-id appearing in an external-share-type containing the keyword NUMERIC shall contain

24、 a simple- numeric-variable or numeric formal-array that refers to a simple-numeric-variable or numeric array-name that appears in apublic-statement in the module-def named in the qualified-id. A qualifred-id appearing in an external-share-type containing the keyword STRING shall contain a simple- s

25、tring-variable or string formal-array that refers to a simple-string-variable or string array-name that appears in a public-statement in the module-def named in the qualified-id. i ANSI X3.113a-1989 Page 8 of 14 pages A qualified-id shall appear in an external-share-type in every program-unit in whi

26、ch the conesponding defined- function, subprogram-name, picture-name, numeric-identifier, or string-identifier is to be used. When not otherwise ambiguous, the module-name and period of a qualified-id appearing in a external-share-type may be omitted in sub- sequent uses of the corresponding defined

27、-function, subprogram-name, picture-name, nwneric-identifier, or string- identifier in a program-unit. The external-share-type containing the qualified-id shall occur in a lower-numbered line than any other reference to that identifier in aprogram-unit. A qualified-id that contains a formal-array sh

28、all be subsequently referred to using the Corresponding array-name (i.e., without the empty parentheses) in place of the formal-array. 183 Examples 2. (First example) 1000 MODULE stack 1020 PUBLIC FNCTION isempty$, isfull$ 1030 SHARE SUB inc, dec 1040 1050 LET maxdepth = 100 1060 LET pointer = O 107

29、0 1080 EXTERNAL SUB inc (x) 1090 LETx=x+l 1100 ENDSUB 1110 ! 1120 EXTERNAL SUB dec (x) 1130 LETX=X-l 1140 ENDSUB 1150 ! 1160 EXTERNAL SUB push (item) 1170 IF pointer = maxdepth then ,_- 2. (Second example) 1000 MODULE Common 1010 1020 PUBLIC STRING a.$ 1030 LET x,y,z = O 1040 LET a$ = “* 1050 END MO

30、DULE 23. EXTERNAL NU?vjERIC common.x, comrnon.y, common.z PUBLIC NUMERIC x, y, z EXTERNAL STRING common.a$ EXTERNAL SUB stack.push, stack.pop EXTERNAL FUNCTION stack.isfull$, stackisempty$ 18.4 Semantics Variables declared in public-statements, share-statements, dimension-statements, or declare-stat

31、ements (other than declare-statements with external-share-type), and simple-Variables appearing in the module-header shall be assigned, at program startup, implementation-defined values consistent with the policies of the implementation. The blocks contained in the module-header shall be executed be

32、fore any procedure or variable whose name appears in the public-statements of the module-header are accessed. Such blocks shall be executed at most once during the run of the program. Where the effect of statements at initialization may depend on the order of initialization of two or more modules in

33、 a program, as may occur with call-statements and function references (e.g., to RND), those effects are implementationdehed. Variables and arrays appearing in the share-statements of the module-header shall have their values preserved between invocations of the procedures contained in the module-def

34、. Variables declared in the public-statements of the module-header shall remain in existence between invocations of the procedures contained in the module-dtf, but may have their values changed inasmuch as they are accessible from outside the module-def. . Channels whose numben appear in the share-s

35、tatements of the module-header shall have their status preserved between invocations of the procedures within the module-def. That is, if the channel refers to an opened fie, then that channel shall remain opened until specrfically closed as a result of an action of an external-procedure contained i

36、n that module-dtf. Procedures within module-deji are external-procedures with respect to the scope of local variables and channels used within such procedures but not appearing as formal-parameters, except that ail variables and channels appear- ing in public-statements or share-statements in the sa

37、me module shaii be accessible from within such procedures. The scope of an OIWON that is not a MODULE OPTION is the external-procedure in which it is found, or, if it is in the module-header, the scope is the module-header. The scope of a MODULE OPTION is the entire module, including the module-head

38、er and all the external- procedures contained in the module- their existence does not in any respect preclude anyone, whether he has approved the standards or not, from manufacturing, marketing, purchasing, or using products, processes, or procedures not conforming to the standards. The American Nat

39、ional Standards Institute does not develop standards and will in no circumstances give an interpretation of any American National Standard. Moreover, no person shall have the right or authority to issue an interpretation of an American National Standard in the name of the American National Standards

40、 Institute. Requests for interpretations should be addressed to the secretariat or sponsor whose name appears on the title page of this standard. CAUTION NOTICE: This American National Standard may be revised or withdrawn at any time. The procedures of the American National Standards Institute requi

41、re that action be taken periodically to reaffirm, revise, or withdraw this standard. Purchasers of American National Standards may receive current information on all standards by calling or writing the American National Standards Institute. American National Published by American National Standards

42、Institute 11 West 42nd Street, New York, New York 10036 Copyright O1 987 by Information Technology Industry Council (ITI) All rights reserved. No part of this publication may be reproduced in any form, in an electronic retrieval system or otherwise, without prior written permission of ITI, 1250 Eye

43、Street NW, Washington, DC 20005. Printed in the United States of America ANSI X3.113-1987 American National Standard for Information Systems - Programming Languages - Full BASIC Secretariat Computer and Business Equipment Manufacturers Association Approved January 28, 1987 American National Standard

44、s Institute, Inc Abstract This standard presents the form for and the interpretation of programs written in the BASIC program- ming language for use on computers and information processing systems. (This Foneword is not part of American National Standard X3.113-1987.) Foreword This American National

45、 Standard specifies the form for and the interpretation of programs written in the BASIC programming languages for use on computers and information pro- cessing systems. Its purpose is to promote portability of BASIC programs for use on a vari- ety of machines. This standard was approved as an Ameri

46、can National Standard by the American National Standards Institute on January 28,1987. Suggestions for improvement of this standard will be welcome. They should be sent to the Computer and Business Equipment Manufacturers Association, 3 11 First Street, NW, Suite 500. Washington, DC 20001. This stan

47、dard was processed and approved for submittal to ANSI by the Accredited Stan- dards Committee on Information Processing Systems, X3. Committee approval of this standard does not necessarily imply that all committee members voted for its approval. At the time it approved this standard, the X3 Committ

48、ee had the following members: Edward Lohse, Chair Richard Gibson, Vice-Chair Catherine A. Kachurik, Administrative Secretary Organization Represented Name of Representative American Express. . D. L. Seigal Lucille Durfee (Alt) American Library Association. Paul Peters American Nuclear Society Gerald

49、ine C. Main D. R. Vondy (Alt) AMPIncorporated PatrickE.Lannan Edward Kelly (Alt) Association for Computing Machinery . Kenneth Magel Jon A. Meads (Alt) Association of the Institute for Certification of Computer Professionals Thomas M. Kurihara AT for example, interpreters or incremental or one-pass compilers. 1.2 Purpose. This standard is designed to promote the interchangeability of BASIC programs among a variety of automatic data processing systems. Programs conforming to this standard will be said to be written in American National Standard (ANS) BASIC. 1.3 Referenced

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1