{"id":12170,"date":"2023-11-01T00:49:21","date_gmt":"2023-11-01T00:49:21","guid":{"rendered":"http:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=12170"},"modified":"2024-06-19T06:06:42","modified_gmt":"2024-06-19T06:06:42","slug":"%ef%bc%8820231101%ef%bc%89%e4%bb%8a%e6%97%a5%e3%81%ae%e8%8b%b1%e8%aa%9e","status":"publish","type":"post","link":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=12170","title":{"rendered":"\u4eca\u65e5\u306e\u82f1\u8a9e(QuickBasic \u30de\u30cb\u30e5\u30a2\u30eb\u3092\u8aad\u3080)"},"content":{"rendered":"<p>\u6ce8\uff11\uff1aintermadiate \u3078\u306e\u5207\u308a\u66ff\u3048\u306f F6 key \u3067\u53ef\u80fd\u3002<\/p>\n<p>\uff08\uff11\uff09The increment defaults to a value of one if it isn\u2019t specified.<\/p>\n<p>\u5897\u5206\u306f\u3001\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u30011\u3068\u306a\u308b<\/p>\n<p>\uff08\uff12\uff09There are many ways to write a program. If your program works, it\u2019s correct, even<br \/>\nif it differs from the program given here.<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u65b9\u6cd5\u306f\u305f\u304f\u3055\u3093\u3042\u308a\u307e\u3059\u3002\u3082\u3057\u3042\u306a\u305f\u304c\u66f8\u3044\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3001\u3053\u3053\u3067\u4e0e\u3048\u3089\u308c\u305f\u3082\u306e\u3068\u7570\u306a\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3082\u6a5f\u80fd\u3059\u308b\u306e\u306a\u3089\u3070\u3001\u305d\u308c\u306f\u6b63\u3057\u3044\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<\/p>\n<p>\uff08\uff13\uff09Prompt the user for quantity of numbers to be averaged.<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u306b\u3001\u5e73\u5747\u5316\u3059\u308b\u6570\u5024\u306e\u6570\u91cf\u3092\u6c42\u3081\u3055\u305b\u308b\u3002<\/p>\n<p>\uff08\uff14\uff09p68, The program computes the average of several numbers. It could be written in the following sequence.<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3044\u304f\u3064\u304b\u306e\u6570\u5024\u306e\u5e73\u5747\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u9806\u756a\u3067\u66f8\u304f\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\uff08\uff15\uff09p68, A solution is given below, but please try to create your own program before peeking.<\/p>\n<p>\u624b\u9806\u306f\u4ee5\u4e0b\u306b\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u8997\u304f\u524d\u306b\u72ec\u81ea\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\uff08\uff16\uff09P.78\u3000Aggregate data types are those that can include both strings and all types of numeric values.<\/p>\n<p>\u96c6\u8a08\u30c7\u30fc\u30bf\u578b\u306f\u3001\u6587\u5b57\u5217\u3068\u5168\u3066\u306e\u578b\u306e\u6570\u5024\u306e\u4e21\u65b9\u3092\u542b\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\uff08\uff17\uff09p.82 Although every program has a module<br \/>\nlevel, a procedure level does not exist until a procedure is actually defined.<\/p>\n<p>\u3059\u3079\u3066\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u306f\u5c3a\u5ea6\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30ec\u30d9\u30eb\u306e\u5834\u5408\u3001\u624b\u9806\u306e\u30ec\u30d9\u30eb\u306f\u624b\u9806\u304c\u5b9f\u969b\u306b\u5b9a\u7fa9\u3055\u308c\u308b\u307e\u3067\u306f\u5b58\u5728\u3057\u307e\u305b\u3093\u3002<\/p>\n<p>\uff08\uff18\uff09p75, This chapter takes about one hour to complete.<\/p>\n<p>\u3053\u306e\u7ae0\u306e\u6240\u8981\u6642\u9593\u306f\u7d04 1 \u6642\u9593\u3067\u3059\u3002<\/p>\n<p>\uff08\uff19\uff09p.87 On-line help includes complete descriptions and examples of each Quick BASIC statement and function.<\/p>\n<p>\u30aa\u30f3\u30e9\u30a4\u30f3\u30d8\u30eb\u30d7\u306b\u306f\u3001\u5b8c\u6210\u3057\u305f\u8aac\u660e\u66f8\u3068Quick BASIC\u306b\u304a\u3051\u308b\u305d\u308c\u305e\u308c\u306e\u5177\u4f53\u7684\u306a\u6587\u7ae0\u3084\u95a2\u6570\u306e\u4f8b\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<p>\uff08\uff11\uff10\uff09p79,This lets you see the effects of a procedure without running the entire program.<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5168\u4f53\u3092\u5b9f\u884c\u305b\u305a\u306b\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u52b9\u679c\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059<\/p>\n<p>\uff08\uff11\uff11\uff09p.78\uff5e79\u3000If a certain type of error occurs during execution of QCARDS,<br \/>\nthe statements following MemoryErr display a message on the screen, then end<br \/>\nthe program.<\/p>\n<p>QCARDS\u306e\u5b9f\u884c\u4e2d\u306b\u7279\u5b9a\u306e\u7a2e\u985e\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001MemoryErr\u3068\u753b\u9762\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u3066\u304b\u3089\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d42\u4e86\u3057\u307e\u3059<\/p>\n<p>\uff08\uff11\uff12\uff09p.77 QCARDS is a large program, but it is organized according to structured programming principles (that is, it divides complicated tasks into simpler ones).<\/p>\n<p>QCARDS \u306f\u5927\u898f\u6a21\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u304c\u3001\u69cb\u9020\u5316\u3055\u308c\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u539f\u5247\u306b\u5f93\u3063\u3066\u7de8\u6210\u3055\u308c\u3066\u3044\u307e\u3059 (\u3064\u307e\u308a\u3001\u8907\u96d1\u306a\u30bf\u30b9\u30af\u304c\u3088\u308a\u5358\u7d14\u306a\u30bf\u30b9\u30af\u306b\u5206\u5272\u3055\u308c\u307e\u3059)\u3002<\/p>\n<p>\uff08\uff11\uff13\uff09 p.79 Press ENTER to execute the line you just typed.<\/p>\n<p>ENTER\u3092\u62bc\u3057\u3066\u3001\u5165\u529b\u3057\u305f\u884c\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\uff08\uff11\uff14\uff09p80,Try this to break an unconditional loop<\/p>\n<p>\u7121\u6761\u4ef6\u30eb\u30fc\u30d7\u3092\u65ad\u3061\u5207\u308b\u306b\u306f\u3001\u3053\u308c\u3092\u8a66\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n<p>\uff08\uff11\uff15\uff09p79, There are two levels of programming in QCARDS. The module level contains the program&#8217;s  most general logic. The procedure level contains many individual procedures that do the program&#8217;s detailed work.<\/p>\n<p>QCARDS \u306b\u306f 2 \u3064\u306e\u30ec\u30d9\u30eb\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u3042\u308a\u307e\u3059\u3002 \u30e2\u30b8\u30e5\u30fc\u30eb \u30ec\u30d9\u30eb\u306b\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u6700\u3082\u4e00\u822c\u7684\u306a\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u30d7\u30ed\u30b7\u30fc\u30b8\u30e3 \u30ec\u30d9\u30eb\u306b\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8a73\u7d30\u306a\u4f5c\u696d\u3092\u5b9f\u884c\u3059\u308b\u591a\u304f\u306e\u500b\u5225\u306e\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\uff08\uff11\uff16\uff09p.91 Some errors are not apparent until you actually try to run your code.<\/p>\n<p>\u3044\u304f\u3064\u304b\u306e\u30a8\u30e9\u30fc\u306f\u3001\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u307e\u3067\u308f\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\uff08\uff11\uff17\uff09p83,Procedures are an effective way to code tasks that are performed repeatedly.<\/p>\n<p>\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306f\u3001\u7e70\u308a\u8fd4\u3057\u5b9f\u884c\u3055\u308c\u308b\u30bf\u30b9\u30af\u3092\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3059\u308b\u52b9\u679c\u7684\u306a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\uff08\uff11\uff18\uff09p.83 QuickBASIC lets you define two types of procedures: SUB and FUNCTION procedures<\/p>\n<p>QuickBASIC\u3067\u306f\u3001SUB\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3068FUNCTION\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\uff12\u7a2e\u985e\u306e\u624b\u9806\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059<\/p>\n<p>\uff08\uff11\uff19\uff09 p80: However, QuickBASIC checks for one particular key-press combination,  CTRL+break, which lets you break out of an infinite loop and return to the QuickBASIC environment.<\/p>\n<p>\u305f\u3060\u3057\u3001QuickBASIC \u306f 1 \u3064\u306e\u7279\u5b9a\u306e\u30ad\u30fc\u62bc\u3057\u306e\u7d44\u307f\u5408\u308f\u305b (CTRL+break) \u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7121\u9650\u30eb\u30fc\u30d7\u304b\u3089\u629c\u3051\u51fa\u3057\u3066 QuickBASIC \u74b0\u5883\u306b\u623b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\uff08\uff12\uff10\uff09p.80 Note that when you finish adding code to QCARDS, a user will be able to press any of the high-intensity letters on the QCARDS command line to execute commands.<\/p>\n<p>QCARDS\u3078\u306e\u30b3\u30fc\u30c9\u306e\u8ffd\u52a0\u304c\u7d42\u4e86\u3059\u308b\u3068\u3001\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u306fQCARDS\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3046\u3048\u3067\u9ad8\u6c34\u6e96\u306e\u6587\u3092\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\uff08\uff12\uff11\uff09p87,One thing that makes editing in QuickBASIC different from using an ordinary word processor is its\u201csmart editor&#8221;.<\/p>\n<p>QuickBASIC\u3067\u306e\u7de8\u96c6\u304c\u901a\u5e38\u306e\u30ef\u30fc\u30c9\u30d7\u30ed\u30bb\u30c3\u30b5\u3068\u7570\u306a\u308b\u70b9\u306e1\u3064\u306f\u3001\u305d\u306e\u300c\u30b9\u30de\u30fc\u30c8\u30a8\u30c7\u30a3\u30bf\u300d\u3067\u3059\u3002<\/p>\n<p>(22) p42, The adddress is a number that gives the memory location,the same way your house address shows where you live on a street.<\/p>\n<p>\u4f4f\u6240\u306f\u9053\u8def\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u8a18\u61b6\u306e\u5834\u6240\u3092\u793a\u3059\u756a\u53f7\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\uff11\uff1aintermadiate \u3078\u306e\u5207\u308a\u66ff\u3048\u306f F6 key \u3067\u53ef\u80fd\u3002 \uff08\uff11\uff09T &#8230; <a class=\"more-link\" href=\"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/?p=12170\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-12170","post","type-post","status-publish","format-standard","hentry","category-column"],"_links":{"self":[{"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12170"}],"version-history":[{"count":15,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12170\/revisions"}],"predecessor-version":[{"id":12774,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/12170\/revisions\/12774"}],"wp:attachment":[{"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zairyo.susi.oita-u.ac.jp\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}