

graphics button title$, x,y,w,h,asc("t") ' Puts up a button that enters the letter "t".If these statements resonate with you and nothing changes, there may be long-term consequences. turnleft turnright up user-interface Edit a$ = inputbox("prompt", "title", "default", 0) ' Puts up a dialog box and ask for input. sprite n turn d ' Turns heading CCW d degrees. built in sprite rsrc_id's are 128 to 142 sprite n forward x ' Moves sprite #n x pixels. pendown penup sprite 1, 100,50, 128 ' Draws sprite #1 at (100,50) sprite n, x,y, rsrc_id ' Sprites are ICN# icon images. sprites Edit down ' Create your own sprites with ResEdit. call "savepicture", fname$ ' Saves a PICT file. Pictures Edit graphics pict x, y, filename$ ' Displays a PICT file. Graphics-functions Edit botton_down = mouse(0) current_x = mouse(1) current_y = mouse(2) last_click_x = mouse(3) graphics-window Edit graphics 0 ' This makes the window appear. see also - colors sprites pictures graphics-window.graphics fillrect x1,y1, x2,y2 ' also filloval for ovals graphics circle r graphics rect x1,y1, x2,y2 ' Draws a rectangle. lineto x,y ' Draw a line to this end point. Graphics Edit colors Edit graphics color r,g,b ' red, green, blue values (range 0-100) graphics color 100,100,100 ' white graphics color 100, 0, 0 ' red drawing Edit moveto x,y ' This sets the starting point. Tan Edit tanh Edit ubound Edit ucase$ Edit val Edit
#Chipmunk basic nicholo mac#
In previous example, mixing string with integer will produce a Type mismatch error.Ī more interesting example, in a Unix based machine (like Mac OS), for using ls, awk, str$ and system$ for listing the first 3 files in folder /Users/nmm/Desktop/:Ģ0 PRINT system$("ls /Users/nmm/Desktop| awk '(NR="+str$(n)+")") This function is used to convert a number to a string, for example: print "this is my number:"+str$(123+2), prints: this is my number:125. input$ Edit int Edit isarray Edit lcase$ Edit left$ Edit len Edit log Edit log10 Edit mid$ Edit right$ Edit rnd Edit sgn Edit sin Edit sinh Edit sqr Edit str$ Edit inkey$ Edit a$ = inkey$ ' Polls for keyboard input. The format of the latter is the same formatting syntax as the print using statement. floor Edit format$ Edit format$( Value, String Expression ) Returns the string representation of Value formatted according to the format StringExpression. field$(s$, n, seperator_char$) ' Space is seperator default. cos Edit cosh Edit exp Edit field$ Edit field$(my_str$, word_num) ' Chops words out of a sentence.
#Chipmunk basic nicholo how to#
See XFA01 for an example of how to use this function. Open files are supposed to be closed after one of these commands.


del 40-90 to get rid of lines numbered 40 thru 90.
#Chipmunk basic nicholo for mac os x#
Chipmunk Basic pocketManual as supplied to freeware interpreter for Basic programming language called Chipmunk Basic (release 3 version 6 update 6 patch 0) for Mac OS X ( Snow Leopard) or newer by Ron H Nicholson.
