Considering that your program is working in a textual environment 25 Lines x 80 Columns (CGA Text Mode 640x200)
Syntax for FreeBASIC
dim as integer column = 0, row = 0 'Set the variable for store the position
dim as string char = "" ' Set a variable for store the pressed key
cls ' Clear the screen
row = csrlin ' read the actual cursor row and store inside the var row
column = pos ' read the actual cursor column and store inside the var column
do until ( char = chr(27) ) ' make a loop until you press ESC key
char = inkey ' store the pressed key in char variable
if not(char = "") Then ' When you press a key and char store the pressed key then start this routine
if not(char = chr(27)) then ' if pressed a key and not are the ESC or Enter or backspace key
if char = chr(13) then ' when press enter
row = row + 1 ' add a new line if enter are pressed
if row > 23 then row = 23 ' put the stop at row 23
column = 0 ' Put the column at beginning
end if
if char = chr(8) then ' when press backspace
locate row, column
print " "
column = column - 2 ' remove a value from column
if column < 0 then column = 0 ' column cant be lower than 0
end if
if column > 79 then column = 79 ' stop the cursor at 79 column
locate row, column ' move the cursor where
print char ' print the key pressed
column = column + 1 ' add a value to the initial value
end if
locate 24,60 : Print "Row:(" & str(Row) & ") Column:(" & Str(Column) & ")" ' this show where the next cha appair
End if
loop
Forgive me if I correct your opinion, but BASIC has evolved like other Programming Languages, VB.NET and FreeBASIC, where you can develop objects, libraries and take advantage of libraries written in other languages like C and C ++, Currently the same FreeBASIC is a Port of C and as like him has the same potential, in fact it is possible to develop applications for graphical and textual environment on Linux and Windows, you can implement libraries to use databases like MySQL and Oracle, also the same FreeBASIC manages multiple threads to run multiple processes simultaneously .