|
Post by bluatigro on Mar 14, 2019 6:11:13 GMT -5
i tryed my spred sheet in 348 i got a asifstring error[/p]
dim cel$(3, 3) grid #w.grid, cel$(), [grid.clicked], 10, 10, 300, 300 button #w.btn , "CALC" , [btn] , UL , 0 , 0 , 30 , 30 for x = 0 to 3 for y = 0 to 3 cel$( x , y ) = str$( x ) ; " + " ; y next y next x open "spred sheet 0.1" for window as #w #w.grid columnnames( "1" , "2" , "3" , "4" ) #w.grid columnwidths( 50 ) #w.grid rownames( 1 , 2 , 3 , 4 ) #w.grid rowlabelwidth( 50 ) #w.grid selectxy( 4 , 4 ) print #w.grid value$() #w.grid setvalue( "cel$(3,1)+cel$(3,2)" ) print #w.grid value$() print #w.grid debug$() wait
[grid.clicked] xy$ = #w.grid cellxy$() colom = val( word$( xy$ , 1 ) ) row = val( word$( xy$ , 2 ) ) #w.grid selectxy( colom , row ) q$ = "cel( " ; colom ; " , " ; row ; " ) =" prompt q$ ; in$ #w.grid setvalue( in$ ) wait [btn] xy$ = #w.grid cellxy$() colom = val( word$( xy$ , 1 ) ) row = val( word$( xy$ , 2 ) ) #w.grid selectxy( colom , row ) q$ = #w.grid value$() ''<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this is again the error line !! notice chr$( 13 ) + q$ + chr$( 13 ) + eval$( q$ ) wait
|
|
|
Post by bluatigro on Mar 14, 2019 6:25:22 GMT -5
i tryed my JB2.0 VR system it shoot be working i got error : asifstring
'' bluatigro 22 feb 2019 '' VR jb2 try dim triangle( 100 , 12 ) , pnt( 255 , 2 ) global tritel 'line 4 WindowWidth = DisplayWidth WindowHeight = DisplayHeight global winx , winy , pi , key$ global t.x1,t.y1,t.z1,t.x2,t.y2,t.z2,t.x3,t.y3,t.kl,t.led.x,t.led.y,t.led.z global p.x,p.y,p.z t.x1 = 0 t.y1 = 1 t.z1 = 2 t.x2 = 3 t.y2 = 4 t.z2 = 5 t.x3 = 6 t.y3 = 7 t.z3 = 8 t.kl = 12 t.led.x = 9 t.led.y = 10 t.led.z = 11 p.x = 0 p.y = 1 p.z = 2 global black,red,green,yellow global blue,magenta,cyan,white black = rgb( 0, 0, 0) red = rgb(255, 0, 0) green = rgb( 0,255, 0) yellow = rgb(255,255, 0) blue = rgb( 0, 0,255) magenta = rgb(255, 0,255) cyan = rgb( 0,255,255) white = rgb(255,255,255)
pi = atn( 1 ) * 4
winx = WindowWidth winy = WindowHeight nomainwin open "VR for justbasic 2.0 ." for graphics as #m #m "trapclose [quit]" #m "when characterInput [key]" tritel = 0 call setpoint 0 , 100 , 100 , 100 call setpoint 1 , 100 , 100 , -100 call setpoint 2 , 100 , -100 , 100 call setpoint 3 , 100 , -100 , -100 call setpoint 4 , -100 , 100 , 100 call setpoint 5 , -100 , 100 , -100 call setpoint 6 , -100 , -100 , 100 call setpoint 7 , -100 , -100 , -100 call quad 0 , 1 , 3 , 2 , red call quad 7 , 6 , 4 , 5 , cyan notice "push [esc] to end VR ." timer 1000 , [tick] wait [key] key$ = right$( Inkey$ , 1 ) if key$ <> chr$( 27 ) then wait [quit] close #m end [tick] scan #m "cls" for i = 0 to tritel for p = 0 to 11 step 3 x = triangle( i , p ) z = triangle( i , p + 2 ) call rotate x , z , 10 triangle( i , p ) = x triangle( i , p + 2 ) = z next p next i sort triangle() , 0 , tritel - 1 , t.led.z ''<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this is the error line !! for i = 0 to tritel - 1 call drawtriangle i next i wait sub rotate byref k , byref l , deg s = sin( rad( deg ) ) c = cos( rad( deg ) ) hk = k * c - l * s hl = k * s + l * c k = hk l = hl end sub function rgb( r , g , b ) r = r and 255 g = g and 255 b = b and 255 rgb = r + g * 256 + b * 256 ^ 2 end function function rad( deg ) rad = deg * pi / 180 end function sub setpoint no , x , y , z pnt( no , p.x ) = x pnt( no , p.y ) = y pnt( no , p.z ) = z end sub sub tri p1 , p2 , p3 , kl triangle( tritel , t.x1 ) = pnt( p1 , p.x ) triangle( tritel , t.y1 ) = pnt( p1 , p.y ) triangle( tritel , t.z1 ) = pnt( p1 , p.z ) triangle( tritel , t.x2 ) = pnt( p2 , p.x ) triangle( tritel , t.y2 ) = pnt( p2 , p.y ) triangle( tritel , t.z2 ) = pnt( p2 , p.z ) triangle( tritel , t.x3 ) = pnt( p3 , p.x ) triangle( tritel , t.y3 ) = pnt( p3 , p.y ) triangle( tritel , t.z3 ) = pnt( p3 , p.z ) x1 = pnt( p1 , p.x ) y1 = pnt( p1 , p.y ) z1 = pnt( p1 , p.z ) x2 = pnt( p2 , p.x ) y2 = pnt( p2 , p.y ) z2 = pnt( p2 , p.z ) x3 = pnt( p3 , p.x ) y3 = pnt( p3 , p.y ) z3 = pnt( p3 , p.z ) triangle( tritel , t.led.x ) = ( x1 + x2 + x3 ) / 3 triangle( tritel , t.led.y ) = ( y1 + y2 + y3 ) / 3 triangle( tritel , t.led.z ) = ( z1 + z2 + z3 ) / 3 triangle( tritel , t.kl ) = kl tritel = tritel + 1 end sub sub quad p1 , p2 , p3 , p4 , kl call tri p1 , p2 , p3 , kl call tri p2 , p3 , p4 , kl end sub sub drawtriangle no x1 = int( winx / 2 + triangle( no , t.x1 ) ) y1 = int( winy / 2 - triangle( no , t.y1 ) ) x2 = int( winx / 2 + triangle( no , t.x2 ) ) y2 = int( winy / 2 - triangle( no , t.y2 ) ) x3 = int( winx / 2 + triangle( no , t.x3 ) ) y3 = int( winy / 2 - triangle( no , t.y3 ) ) kl = triangle( no , t.kl ) r = int( kl ) and 255 g = int( kl / 256 ) and 255 b = int( kl / 256 ^ 2 ) and 255 #m "color " ; r ; " " ; g ; " " ; b if y1 > y3 then call swap y1 , y3 call swap x1 , x3 end if if y1 > y2 then call swap y1 , y2 call swap x1 , x2 end if if y2 > y3 then call swap y2 , y3 call swap x2 , y3 end if if near( y1 , y2 , 1e-5 ) then y1 = y1 - 1e-4 if near( y2 , y3 , 1e-5 ) then y3 = y3 + 1e-4 for i = y1 to y3 a = x1 + ( x3 - x1 ) * ( i - y1 ) / ( y3 - y1 ) if i < y2 then b = x1 + ( x2 - x1 ) * ( i - y1 ) / ( y2 - y1 ) else b = x2 + ( x3 - x2 ) * ( i - y2 ) / ( y3 - y2 ) end if #m "down" #m "line " ; a ; " " ; i _ ; " " ; b ; " " ; i #m "up" next i 'close #m end sub sub swap byref a , byref b h = a a = b b = h end sub function near( a , b , c ) near = abs( a - b ) < c end function
|
|