====== LET ====== /* Remove the comments after creating content for each section.*/ Assigns a value or expression to a variable; optional usage in most BASICs /* 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:Dartmouth:dartmouth1]], [[:basics:ANSI:ansimin]], [[:basics:ANSI:ansifull]], [[:basics:hptsb:]], [[:basics:decbasic:]], [[:basics:Altair:]], [[:basics:a2int:]], [[:basics:Applesoft:]], [[:basics:TI994:]], [[:basics:CBM:]], [[:basics:Atari:]], [[:basics:msatari:]], [[:basics:trs80:]], [[:basics:trs80:level2]], [[:basics:trscolor:colormc]], [[:basics:Sinclair:zx81]], [[:basics:Sinclair:spectrum]], [[:basics:BBC:]], [[:basics:GWBASIC:]], [[:basics:MSX:]], [[:basics:bwbasic:]], [[:basics:bwbasic:bw32]], [[:basics:ABasiC:]], [[:basics:msqb:QBasic]], [[:basics:VBDOS:]], [[:basics:FreeBASIC:]], [[:basics:Gambas:]], [[:basics:minibasicmm:]], [[:basics:minibasicjs:]] **With variations:** [[:basics:TI994:ti994ext]] (accepting comma-separated list of variables), [[:basics:Atari:ataplus]] (mandatory for variables with names starting with or equal to reserved keywords), [[:basics:Atari:atxl]] (mandatory for variables with names starting with or equal to reserved keywords), [[:basics:Sinclair:]] (mandatory for ZX80), [[:basics:Atom:]] (not for array assignment) **Also written as: ** ===== Usage ===== With or without line numbers, LET introduces any assignment as in: ''LET A = SIN(X)'' In most BASICs it can simply be left out, and assignments will work anyway. ==== Variations ==== LET is almost always optional, but in some implementations it is mandatory for assignments, such as in [[:basics:sinclair:zx80|Sinclair ZX-80 4k BASIC]]. ===== 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 ===== LET is one of the original keywords of the BASIC languages and must have been implemented by every single BASIC since [[:basics:dartmouth]], but it did not take long until it became optional in almost every implementation. ===== 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 */ ===== In other languages... ===== /* For parallels and comparisons with other modern-day languages */ Assignment commands are not usual in other programming languages. In Tcl/Tk, the ''set'' keyword performs pretty much like LET and is mandatory in every assignment, as Tcl/Tk syntax is positional and always requires a command as its first word of a sentence. ===== 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 Original Variables}}