Terminal control/Positional read: Difference between revisions
Terminal control/Positional read (view source)
Revision as of 19:36, 16 September 2020
, 3 years agoadded Perl programming solution
(added Perl programming solution) |
|||
Line 224:
The character at column 3, row 6 is 'A'
</pre>
=={{header|Perl}}==
{{trans|Raku}}
<lang Perl># 20200917 added Perl programming solution
use strict;
use warnings;
use Curses;
initscr or die;
my $win = Curses->new;
foreach my $row (0..9) {
$win->addstr( $row , 0, join('', map { chr(int(rand(50)) + 41) } (0..9)))
};
my $icol = 3 - 1;
my $irow = 6 - 1;
my $ch = $win->inch($irow,$icol);
$win->addstr( $irow, $icol+10, 'Character at column 3, row 6 = '.$ch );
$win->addstr( LINES() - 2, 2, "Press any key to exit..." );
$win->getch;
endwin;</lang>
=={{header|Phix}}==
|