TRINITY CSCI 1320  Lecture Notes (13 pages)
Previewing pages 1, 2, 3, 4 of 13 page document View the full content.Lecture Notes
Previewing pages 1, 2, 3, 4 of actual document.
View the full content.View Full Document
Lecture Notes
0 0 53 views
 Pages:
 13
 School:
 Trinity University
 Course:
 Csci 1320  Principles of Computer Science I
Principles of Computer Science I Documents

Sequential Execution and Scripts
9 pages

14 pages

10 pages

4 pages

8 pages

Machine Arithmetic, Characters, and Strings
16 pages

16 pages

8 pages

8 pages

9 pages

12 pages

15 pages

10 pages

7 pages

15 pages

10 pages

8 pages

3 pages

15 pages

9 pages

8 pages

10 pages

13 pages

10 pages

10 pages

9 pages

16 pages

11 pages

Boolean Expressions and Functions
12 pages

Boolean Expressions and Functions
13 pages

Sequential Execution and Scripts
9 pages

8 pages

10 pages

14 pages

13 pages

4 pages

3 pages

15 pages

14 pages

10 pages

Scala, Binary, Machine Arithmetic
17 pages

9 pages

9 pages

10 pages

11 pages

4 pages

7 pages

11 pages

Scala, Binary, Machine Arithmetic
14 pages

11 pages

12 pages

4 pages

11 pages

8 pages

5 pages

15 pages

9 pages

8 pages

18 pages

7 pages

6 pages

Machine Arithmetic, Characters, and Strings
18 pages

10 pages

13 pages

14 pages

9 pages

11 pages

7 pages

9 pages

7 pages

11 pages

15 pages

Functions and Function Literals
10 pages

4 pages

13 pages

Linked Structures and Conclusions
6 pages

9 pages

10 pages

13 pages

15 pages

7 pages

16 pages

9 pages

11 pages

8 pages

13 pages

15 pages

10 pages

14 pages

6 pages

11 pages

10 pages

12 pages

4 pages

13 pages

8 pages

18 pages

11 pages

10 pages

8 pages

13 pages
Sign up for free to view:
 This document and 3 million+ documents and flashcards
 High quality study guides, lecture notes, practice exams
 Course Packets handpicked by editors offering a comprehensive review of your courses
 Better Grades Guaranteed
Unformatted text preview:
Fun Day 11 21 2007 1 Opening Discussion Let s look at solutions to the interclass problem Vote was 7 for ASCII 10 for X11 Do you have any questions about the assignment 2 Full Terminal Control The ncurses library provides you with functions that allow you to write any ASCII character that you want to any point on the screen This can allow you to do ASCII animations It also includes functions for doing non blocking input and input of non character keys Normal scanf and getchar functions only read from a terminal once enter has been pressed Note that this isn t portable code It won t work on a Windows box unless perhaps you have something like Cygwin 3 Setup In order to set up a window so that you can use curses function with it you need to initialize it You do this with the WINDOW initscr function Let s look at the man page for this function The WINDOW that is returned needs to be remembered because it has to be passed to most of the functions that will draw out characters for us 4 Drawing Functions There are number of different functions that can output to the screen I m not going to type them all up here but I ll give a little list We can look at a web page for a more complete list mvaddch win y x ch mvwaddstr win y x str mvwaddchstr win y x chstr After calling one of these call refresh win to see the change You can use the See Also section of the man pages to find more related functions 5 Input Functions There are a number of functions for getting input in curses The simplest is wgetch win Unless you set other options this will work just like getchar blocking the program and printing to screen The following lines will allow non blocking nonprinted input that doesn t print keypad win 1 wtimeout win 0 necho 6 X Windows and X11 Linux and Unix boxes use a windowing system called X windows This is a very general graphical system that allows a lot of flexibility One of the most significant features of X windows is the ability to display windows remotely Cygwin can give
View Full Document