====== GET ====== /* Remove the comments after creating content for each section.*/ Reads a record from a device or random-access file; in some BASICs reads the next character eventually available from the keyboard; may also copy an area of a graphic screen /* For the lines below, just create links, separated by commas, to other pages of the BASICs section, like [[:basics:basicTagName]]. "Implemented by" should mention BASICs which implement the keyword like described, in a more usual and standard way. "With variations" should point to BASICs where this keyword is used a bit differently. "Also written as" should list alternative spellings and abbreviations this keyword has. No need to refer to a BASIC, there is a section for that later. */ **Implemented by:** [[:basics:ANSI:ansifull]], [[:basics:Atari:]], [[:basics:msatari:]], [[:basics:trs80:trsdisk]], [[:basics:BBC:]], [[:basics:GWBASIC:]], [[:basics:MSX:msxdisk]], [[:basics:bwbasic:]], [[:basics:bwbasic:bw32]], [[:basics:VBDOS:]] **With variations:** [[:basics:hptsb:]], [[:basics:decbasic:]], [[:basics:Applesoft:]], [[:basics:Applesoft:tasc]] (for a numeric variable, defaults to 0 if a non-digit is entered), [[:basics:CBM:]], [[:basics:Atari:atxl]] (special behaviour with graphics), [[:basics:trs80:level3]] (includes GET@ for screen coordinates), [[:basics:trscolor:colorext]] (graphics: reads content from a rectangle into an array), [[:basics:Atom:]] (for files only), [[:basics:ABasiC:]], [[:basics:msqb:QBasic]] (both for files/devices and for graphics to retrieve a pixels matrix), [[:basics:FreeBASIC:]], [[:basics:ugBASIC:]] (as GET IMAGE), [[:basics:minibasicjs:]] **Also written as: ** ===== Usage ===== /* For inline examples of syntax, write the keyword between '' and '' (two single quotes) */ ==== Variations ==== In the Applesoft-ish [[:basics:applesoft:mpf2|Micro-Professor BASIC]] and early [[:basics:acorn|Acorn BASIC]], the GET keyword was somewhat similar in functionality of [[INKEY-S|INKEY$]] found in other BASICs, but there is a significant difference: GET works in //blocking mode//. Just like [[INPUT]], it sits and waits until a key is pressed. It dispenses the usual INKEY$ loop so common in menus, for example, but it will not work for games. [[PEEK]] and [[POKE]] workarounds would allow INKEY$ simulation with detection of keyboard scan codes and further conversion to ASCII character codes ((//"A Função INKEY$ no TK-2000"//: INPUT (Brazilian edition) vol. 2, p. 496-499. Nova Cultural, 1986, Brasil)) ((//"Right..Up...Left...Fire!"//: INPUT (British edition) vol 1, p.55. Marshall-Cavendish, 1985, England. Available online in https://archive.org/details/Input_Vol_1_No_02_1997_Marshall_Cavendish_GB/page/n23/mode/2up last checked 2023-02-18)). ===== Examples ===== /* Below is an example of a code block, using GeSHi syntax highlighting for //gwbasic//. Other styles of interest might be //basic4gl//, //blitzbasic//, //freebasic//, //gambas//, //locobasic//, //purebasic//, //qbasic//, //sdlbasic//, //thinbasic//, //vb//, //vbnet//, //xbasic// or //zxbasic//. 10 PRINT "HELLO" */ ===== Comments ===== /* Origin of the keyword, opinions, history... */ ===== Related keywords ===== /* Keywords that are often or always used along this one */ ===== Similar keywords ===== /* Keywords with the same or similar functionality found in other versions of BASIC */ * [[INKEYS|INKEY$]] ===== In other languages... ===== /* For parallels and comparisons with other modern-day languages */ ===== References ===== /* If you used the ((citation)) syntax elsewhere in the text, they will appear under this section. But you can write some recommendations of books, magazines, etc */ /* ===== TAGS ===== Please use the syntax below for adding tags to this page, separated by spaces (use quotes for tags with spaces). The most important tags to be used are, separated by groups: - Statements | Commands | SpecialVariables | Operators {{tag>tagName}} */ {{tag>Statements}}