インフォ FAQ
言語 環境 比較
 

Index Java ActionScript Lingo Python Design By Numbers

LingoはMacromediaのDirectorに書かれた言語である。DirectorはデザイナーやアーティストがCD-ROMプロジェクトを創作する際の主要な環境だった。ところが、ウェブの時代におけるFlashの成功により、使用者数は減少している。しかし未だに普遍的に使われている環境であり、機能を拡張するすばらしいコードライブラリーがある。


Lingoは、ソフトウェアの異なるエレメントを表すために、ステージやキャストのような言葉のような演劇のメタファーを使って視覚的な環境にまとめられている。Lingoは英語のような冗長なシンタックスで特徴付けられている。近年、オブジェクト構造や、3Dグラフィックをサポートするように修正されている。

 

 

 
  Processing Lingo
  background(0);
background(255);
the stageColor = 255
the stageColor = 0
  background(255, 204, 0); (the stage).bgcolor = rgb(255,204,0)
  stroke(255);
stroke(0);
(the stage).image.draw(x1,y1,x2,y2, 0)
(the stage).image.draw(x1,y1,x2,y2, 255)
  stroke(255, 204, 0); (the stage).image.draw(x1,y1,x2,y2, rgb(255,204,0))
  fill(0, 102, 153); (the stage).image.fill(left, top, right, bottom, rgb(0,102,153))
 
 
  Processing Lingo
  point(30, 20); (the stage).image.setPixel(30,20,rgb(0,120,153))
  line(0, 20, 80, 20); (the stage).image.draw(0, 20, 80, 20, [#shapeType:#line])
  rect(10, 20, 30, 30); (the stage).image.fill(10,20,30,30, [#shapeType:#rect])
(the stage).image.draw(10,20,30,30, [#shapeType:#rect])
 
 
  Processing Lingo
  setPixel(30, 20, 255); (the stage).image.setPixel(30,20,rgb(0,120,153))
  a = getPixel(60, 10); a = (the stage).image.getPixel(60,10)
  pixels[y*width+x] N/A
     
 
  Processing Lingo
  int x = 70;   // Initialize
x = 30;  // Change value
x = 70  -- Initialize
x = 30  -- Change value
  float x = 70.0;   
x = 30.0;
x = 70.0  -- Initialize
x = 30.0  -- Change value
  int[] a = {5, 10, 11};
a[0] = 12;  // Reassign
a = [5,10,11]
a[0] = 12  -- Reassign
     
i
 
  Processing Lingo
  void loop() {
  // Statements
}
repeat while TRUE
-- Statements
end repeat
  for(int a=45; a<=55; a++) {
  // Statements
}
repeat with a = 45 to 55
   -- Statements
end repeat
  if(c==1) {
  // Statements
}
if c = 1 then
   -- Statements
end if
  if(c!=1) {
  // Statements
}
if not(c = 1) then
   -- Statements
end if
  if(c < 1) {
  // Statements
}
if c < 1 then
   -- Statements
end if
  if(c >= 1) {
  // Statements
}
if c >= 1 then
   -- Statements
end if
  if((c >= 1) && (c < 20)) {
  // Statements
}
if c >= 1 and c < 20 then
   -- Statements
end if
 

if(c >= 20) {
  // Statements 1
} else if (c == 0) {
  // Statements 2
} else {
  // Statements 3
}

if c >= 20 then
   -- Statements 1
else if c = 0 then
   -- Statements 2
else
   -- Statements 3
end if
     
i
 
  Processing Lingo
  // Comment -- Comment
  void doIt(int x) {
  // Statements
}

doIt(x);
on doIt x
   -- Statements
end

doIt x
  int square(int x)
{
  return x*x;
}

square(X);
on square x
   return x*x
end

put square(x)
     
i
 
  Processing Lingo
  mouseX
mouseY
mousePressed
the mouseH
the mouseV
mouseDown()
  void mousePressed() {
  // Statements
}
on mouseDown
   -- Statements
end if
  (key=='a') 
(key=='b') 
...
(the key = "a")
(the key = "b")
...
  void keyPressed() {
  // Statements
}
on keyDown
   -- Statements
end
  hour()
minute()
second()
currentTime = the long time
hour = value(chars(currentTime,1,2))
minute = value(chars(currentTime,4,5))
hour =value(chars(currentTime,7,8))
     


Processing >> Lingo by Victor Vina, Josh Nimoy

   
© 2002, 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas