 If you want to open an already existing file select file->open on the menu and then choose the program you want to modify. If you want to open a new.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

C-LISP. LISP 2 Lisp was invented by John McCarthy in 1958 while he was at the Massachusetts Institute of Technology (MIT).John McCarthyMassachusetts Institute.
How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
1 Programming Languages and Paradigms Lisp Programming.
TUTORIAL 3 CSCI3230 ( First Term) By Leo LIU Paco WONG CAO Qin 1 Hands on.
Lisp Recitation (cse471/598 Fall 2007 ) Aravind Kalavagattu.
Functional Programming COMP2003 A course on functional programming using Common Lisp Dr Eleni Mangina
ITERATIVE CONSTRUCTS: DOLIST Dolist is an iterative construct (a loop statement) consisting of a variable declaration and a body The body states what happens.
Introduction to Artificial Intelligence Lisp Ruth Bergman Fall 2002.
First Lecture on Introductory Lisp Yun Peng. Why Lisp? Because it’s the most widely used AI programming language Because AI researchers and theoreticians.
Scite Scintilla integrated text editor. Click here.
Symbolic Expressions (S Expressions) Syntax: Opening and Closing parenthesis having elements in between. List represented in LISP: (A B2 C3 Shahid) (A.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
A Visual Introduction to PC SAS. Start SAS by double-clicking on the SAS icon...
It is suggested that you use the Lisp interpreter available on the general machine (general.asu.edu). You are welcome to use other interpreters while developing,
1 General Reporting HRMS Reports There are two types of HRMS reports: Standard and Customized. Standard reports came with the SAP Software and relate to.
LISP A brief overview. Lisp stands for “LISt Process” –Invented by John McCarthy (1958) –Simple data structure (atoms and lists) –Heavy use of recursion.
COMP 205 – Week 11 Dr. Chunbo Chu. Intro Lisp stands for “LISt Process” Invented by John McCarthy (1958) Simple data structure (atoms and lists) Heavy.
Conditionals and Recursion "To iterate is human, to recurse divine." - L. Peter Deutsch.
A First Program Using C#
Using Eclipse. What is Eclipse? The Eclipse Platform is an open source IDE (Integrated Development Environment), created by IBM for developing Java programs.
The Case primitive: matches the evaluated key form against the unevaluated keys by using eql The general format of case is the following: (case (... ).....
Creating a Web Site to Gather Data and Conduct Research.
Using Harlequin LispWorks. Using LispWorks On BURKS 5, the file is lwper410.exe Start up LispWorks; you get two windows –Listener 1 –LispWorks Personal.
Introduction to Computational Linguistics Programming I.
1 Lisp Functions –Built-in functions –Defining functions –Function Evaluation and Special Forms defun, if Control statements –Conditional if, cond –Repetition.
Lisp Laboratory gcLisp (Golden Common Lisp). Lect. ratchadaporn kanawong2 The history of Lisp In summer 1956, Allen Newell, J.C. Shaw, and Herbert Simon.
Common lisp A functional programming language. Useful URL:
CSE 341, S. Tanimoto Lisp Defining Functions with DEFUN Functions are the primary abstraction mechanism available in Lisp. (Others are structures.
CS 326 Programming Languages, Concepts and Implementation Instructor: Mircea Nicolescu Lecture 7.
GDT Development Tutorial. GDT Development Tutorial Doug Evans and Detlef Lexut GDT 2008 International User Conference August 10 – 13  Lake Las Vegas,
06 INPUT AND OUTPUT Functional Programming. Streams Two kinds of streams  Character streams  Binary streams Character streams are Lisp objects representing.
Open a editor Write/Type the program Save the program with “.c” extension Compile the program (alt + F9) Run/Execute the program (ctrl + F9) Check the.
Chapter 10 Making Books, Tables of Content, and Indexes.
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
For additional assistance, please call the Help Desk Searching 1. If a Search window does not appear after logging into the system, click the Search icon.
Allegro CL Certification Program Lisp Programming Series Level I Session Basic Lisp Development in the IDE.
Lisp Files, Arrays, and Macros CIS 479/579 Bruce R. Maxim UM-Dearborn.
WFM 6311: Climate Risk Management © Dr. Akm Saiful Islam WFM 6311: Climate Change Risk Management Akm Saiful Islam Lecture-7:Extereme Climate Indicators.
Introduction to LISP. Lisp Extensible: It lets you define new operators yourself Lisp programs are expressed as lisp data structures –You can write programs.
UMBC CMSC Common Lisp II. UMBC CMSC Input and Output Print is the most primitive output function > (print (list 'foo 'bar)) (FOO BAR) The.
Milos Hauskrecht (PDF) Hieu D. Vu (PPT) LISP PROGARMMING LANGUAGE.
Control Structures CSC 358/ Outline Midterm Lab #3 Homework #4 Sequential structures Conditional structures Unconditional branching Iteration.
1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based.
Computer Eng. Software Lab II , Semester 2, Who I am: Andrew Davison CoE, WiG Lab Office Functional Programming.
Input Streams “A program designed for inputs from people is usually stressed beyond the breaking point by computer-generated inputs.” Dennis Ritchie, Bell.
EZGİ GENÇ History Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
1 Outline Review Introduction to LISP Symbols and Numbers Lists Writing LISP Functions LISPWorks.
Being Productive With Emacs Part 2
Configure the intercom IP
Logging Into Windows XP for first time (labs only!)
Getting Started with Lisp
Chapter 3 Software Interfaces.
Topic 3.5 Word Processing Application Microsoft Word.
LISP A brief overview.
Allegro CL Certification Program
First Lecture on Introductory Lisp
Modern Programming Languages Lecture 21 Fakhar Lodhi
Lisp Tutorial Click on Xlisp icon – you enter the interpreter
Modern Programming Languages Lecture 20 Fakhar Lodhi
Cisco 7925 Phonebook Userguide
LISP A brief overview.
Matlab.
Using Eclipse.
Defining Functions with DEFUN
Abstraction and Repetition
Basic Lessons 5 & 6 Mr. Kalmes.
Common Lisp II.
The general format of case is the following: (case <key form>
Presentation transcript:

 If you want to open an already existing file select file->open on the menu and then choose the program you want to modify. If you want to open a new file select file->new on the menu and start typing your program on the editor.  You have to save by clicking file->save after you type. Be sure your filename has an extension.lisp  Then you have to compile and load by using file->compile and load… from the menu  Open the listener by clicking tools->listener on the menu. And check to see if the functions defined in your program are correctly working. Lisp File Basics

At the LISP prompt one can type the command or source code(programs) and retrieve the results just like at the DOS or UNIX prompt. In the solaris based LISP as you type /usr/acl5.0.1/lisp at the $ prompt you get the LISP prompt USER. In the windows based LISP you acces the LISP by clicking START menu-->Harlequin lispworks-->lispworks. Then you select tools->listener from the menu bar to invoke the LISP prompt.

Defining functions using “defun” USER(1):(defun funct1 (x) (+ x 1)) FUNCT1 USER(2):(funct1(3)) 4

Manipulating Lists Using Quote:- eg: USER(1): ‘(1 2 3) (1 2 3) Using CAR:- eg: USER(2): CAR( ) 1 Using CDR:- eg:- USER(3): CDR( 1 2 3) ( 2 3)

RECURSION LISP supports recursion just like any procedural language(eg: C) Eg: Raise X to the Nth power (defun raise (x n) (if (= n 0) 1 (* x ( raise x (- n 1) ) ) ) )

ITERATION Using dolist :- dolist repeats a set of operations for as many times as there are entries in a list. Eg:-USER(1): (dolist (x ‘(a b c)) (print x)) A B C NIL

Using LOOP Eg:- USER(15):- (loop for x from 1 to 7 collect x) ( )

Using dotimes :- dotimes repeats an evaluation as many times as it is requested Eg:- USER(10):-(dotimes (i 5 i) (print i) o

Conditional Expressions:- Using CASE. Eg:- User(10):(defun goose (x) (case x (1 ‘one) (2 ‘two) (3 ‘three) (4 ‘four) (otherwise ‘many))) goose

Input and Output > (progn (format t “Please enter your name: ”) (read-line)) > (prin1 “hello”) > (format nil “Dear ~A, ~% Our records indicate …” “Mr. Malatesta”) Note: There are many variants. You need to refer to a CL book.