Terminal control/Positional read: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: syntax coloured, marked p2js incompatible) |
(Terminal control/Positional read In FreeBASIC) |
||
Line 60: | Line 60: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
==={{header|Applesoft BASIC}}=== |
==={{header|Applesoft BASIC}}=== |
||
<lang ApplesoftBasic> 10 DEF FN C(H) = SCRN( H - 1,(V - 1) * 2) + SCRN( H - 1,(V - 1) * 2 + 1) * 16 |
<lang ApplesoftBasic> 10 DEF FN C(H) = SCRN( H - 1,(V - 1) * 2) + SCRN( H - 1,(V - 1) * 2 + 1) * 16 |
||
20 LET V = 6:C$ = CHR$ ( FN C(3))</lang> |
20 LET V = 6:C$ = CHR$ ( FN C(3))</lang> |
||
==={{header| |
==={{header|BBC BASIC}}=== |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
The top Left corner Is at position 0,0 |
|||
<lang freebasic>'Works on Windows. On Linux, the value returned can differ from the character shown on the console. |
|||
'For example, unprintable control codes - such as the LF character (10) that implicitly occurs |
|||
'after the end of Printed text - may be picked up instead of the untouched character in its place. |
|||
Print "T@4;4G,XIJ" |
|||
Print ">C+PE0)RM;" |
|||
Print "JEV6B/8E?H" |
|||
Print "FSC>41UIGR" |
|||
Print "V>41JMXMOW" |
|||
Print "IY0*KH6M;B"' Character at column 3, row 6 = 0 |
|||
Print "-6<UL*>DU7" |
|||
Print "MZ))<5D:B8" |
|||
Print ".@UB/P6UQ)" |
|||
Print "<9HYH)<ZJF" |
|||
Dim As Integer char_ascii_value = Screen(6,3) |
|||
Locate 6, 14 : Print "Character at column 3, row 6 = "; Chr(char_ascii_value) |
|||
Sleep</lang> |
|||
==={{header|Locomotive Basic}}=== |
|||
<lang locobasic>10 LOCATE 3,6 |
<lang locobasic>10 LOCATE 3,6 |
||
20 a$=COPYCHR$(#0)</lang> |
20 a$=COPYCHR$(#0)</lang> |
||
Line 73: | Line 104: | ||
===[[QuickBASIC#QBasic|QBasic]]=== |
===[[QuickBASIC#QBasic|QBasic]]=== |
||
The top left corner is (1, 1). |
The top left corner is (1, 1). |
||
Line 83: | Line 113: | ||
30 LET c$ = SCREEN$(5,2)</lang> |
30 LET c$ = SCREEN$(5,2)</lang> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|C}}== |
=={{header|C}}== |