Smalltalk_

Similar documents
double float

2015-s6-4g-pocket-guidebook_H1-4.indd

Smalltalk_

Java演習(4) -- 変数と型 --

Condition DAQ condition condition 2 3 XML key value

K227 Java 2

Java updated

巧みに投げ、打ち、走るために


Safari AppletViewer Web HTML Netscape Web Web 15-1 Applet Web Applet init Web paint Web start Web HTML stop destroy update init Web paint start Web up

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

untitled

8 if switch for while do while 2

SystemC言語概論

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

Local variable x y i paint public class Sample extends Applet { public void paint( Graphics gc ) { int x, y;... int i=10 ; while ( i < 100 ) {... i +=

PowerPoint Presentation

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

解きながら学ぶC++入門編

r07.dvi

ohp07.dvi

アルゴリズムとデータ構造1

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

第5回お試しアカウント付き並列プログラミング講習会

自動シャットタ<3099>ウンクイックインストールカ<3099>イト<3099>.indb

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

橡中元雅美

2 static final int DO NOTHING ON CLOSE static final int HIDE ON CLOSE static final int DISPOSE ON CLOSE static final int EXIT ON CLOSE void setvisible

ALG ppt

新・明解Java入門

ALG ppt

untitled

untitled

: : : TSTank 2

r1.dvi

2 1 Web Java Android Java 1.2 6) Java Java 7) 6) Java Java (Swing, JavaFX) (JDBC) 7) OS 1.3 Java Java

Smalltalk_

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

I 2 tutimura/ I 2 p.1/??

Java学習教材

RubyKaigi2009 COBOL

2.2 Java C main Java main 2 C 6 C Java 3 C Java ( ) G101Hello.java G101Hello main G101Hello.java /* G101Hello */ class G101Hello { /* main */ public s

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

アルゴリズムとデータ構造1

r02.dvi

ohp02.dvi

1.ppt

cover1.indd

Microsoft Word - keisankigairon.ch doc

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

untitled

明解Javaによるアルゴリズムとデータ構造

ALG2012-A.ppt

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

main.dvi

橡Pro PDF

Emacs Ruby..

CashDrawer ライブラリ API 仕様書 2014/07/09 CashDrawer ライブラリ API 仕様書 Rev / 10

AJAN IO制御コマンド コマンドリファレンス

オブジェクト脳のつくり方

グラフと組み合わせ 課題 7 ( 解答例 ) 2013/5/27 1 列挙 n 個の文字の集合 { } S = a, a,, an の全てからなる文字列 つまり同じ文字を含まない 長さ n の文字列を列挙する 方法を考える 1. 何通りの文字列があるかを答えなさい また そのことが正しい

Java講座

MINI2440マニュアル

新コンフィギュレータのフレームワークについて

cpp1.dvi

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

Nios II ハードウェア・チュートリアル

yacc.dvi

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

プログラミング及び演習 第1回 講義概容・実行制御

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

Program Design (プログラム設計)

homes01_P _chousa_sai.indd

GR-SAKURA-SAのサンプルソフト説明


:30 12:00 I. I VI II. III. IV. a d V. VI

programmingII2019-v01

tuat1.dvi

新・明解C言語 実践編

Oracle Forms Services R6i

:30 12:00 I. I VI II. III. IV. a d V. VI

‚æ4›ñ

GUIプログラムⅣ

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

新版明解C言語 実践編

Thread

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

untitled

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

ex01.dvi

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

r08.dvi

第1章

ASP.NET 2.0 Provider Model 概要

10 (1) s 10.2 rails c Rails 7 > item = PlanItem.new => #<PlanItem id nil, name nil,...> > item.name = "" => "" > item.valid? => true valid? true false

(Java/FX ) Java CD Java version Java VC++ Python Ruby Java Java Eclipse Java Java 3 Java for Everyone 2 10 Java Midi Java JavaFX Shape Canvas C

Transcription:

DLLCC VisualWorks C Mac OS SSK-LampControl/ VisualWorksWithJun SSK-LampControl.h include SSK SSK FileBrowser SSK-LampControl.st FIle in SSK-LampControl File in SSK File in ( Smalltalk.SSK) ( C ) Controller MVC Controller Smalltalk SSK-LampControl LampController C include/lampcontroller.h #ifndef _LAMPCONTROLLER_H_ #define _LAMPCONTROLLER_H_ #define FALSE 0 #define TRUE 1 extern void initialize(void); extern void control(void); extern void powerswitchon(void); extern void powerswitchoff(void); extern int islampon(void); #endif // _LAMPCONTROLLER_H_

Makefile make liblampcontroller.dylib (Win.dll Linux.so) DLLCC.dylib.h DLLCC New Location SSK, Name LampControllerCInterface, Category SSK-LampControl OK include files New

LampController.h include

SSK-LampControl/LampController/include OK library files New liblampcontroller.dylib librarydirectories SSK-LampControl/LampController/Release

External Interface Finder procedures Class Builder

Parse Files procedures OK

Add Methods External Interface Finder ( ) defines defines Builder Parse Files FALSE TRUE Add Methods

TRUE FALSE int Boolean LampControllerByC.st File in LampControllerByC

TRUE islampon ^controller islampon = controller TRUE 32bit VisualWorks C WorkSpace.st do it anapplication anapplication := SSK.LampControlSimulator new. anapplication lampcontroller: SSK.LampControllerByC new. anapplication open. LampControlSimulator, Instance, defaults, defaultlampcontrollerclass LampController LampControllerByC none SSK LampControllerCInterface SSK-LampControl

C controlloop initialize [self hasterminated] whilefalse: [self inrefresh. self control. self outrefresh. (Delay formilliseconds: 1) wait] powerswitch := (PushSwitch named: 'PowerSwitch') off. lamp := Brightness new darkest. hasterminated := false. controlprocess := Process forblock: [self controlloop] priority: Processor userinterruptpriority C inrefresh powerswitch ison iftrue: [self lampcontroller powerswitchon] iffalse: [self lampcontroller powerswitchoff] outrefresh self lampcontroller islampon iftrue: [lamp brightest] iffalse: [lamp darkest] GUI C C 1msec initialize controlprocess initialize postopenwith: postopenwith: abuilder super postopenwith: abuilder. controlprocess resume. controlprocess resume noticeofwindowclose: noticeofwindowclose: awindow "The ApplicationWindow awindow is in the process of closing. You have been notified."

super noticeofwindowclose: awindow. hasterminated := true. ^self hasterminated true Debug Open Process Monitor C IO.h #ifndef _IO_H_ #define _IO_H_ extern void IO_initialize(void); extern void IO_powerSwitchOn(void); extern void IO_powerSwitchOff(void); extern int IO_isPowerSwitchOn(void); extern void IO_lampOn(void); extern void IO_lampOff(void); extern int IO_isLampOn(void); #endif /* IO_H_ */ Control.c #include "IO.h" #include "Control.h" static int previouspowerswitchstate = 0; void Control_initialize(void) previouspowerswitchstate = IO_isPowerSwitchOn(); void Control_control(void) int presentpowerswitchstate = IO_isPowerSwitchOn(); if (!previouspowerswitchstate && presentpowerswitchstate) if (IO_isLampOn()) IO_lampOff(); else IO_lampOn(); previouspowerswitchstate = presentpowerswitchstate; /***** End of File *****/ LampController.c Smalltalk Smalltalk #include "IO.h" #include "Control.h" #include "LampController.h" void initialize(void) IO_initialize(); Control_initialize(); void control(void) Control_control(); void powerswitchon(void) IO_powerSwitchOn(); void powerswitchoff(void) IO_powerSwitchOff(); int islampon(void) return IO_isLampOn(); /***** End of File *****/ C