This may be of help as it shows both YABASIC and SB as a template before being generated as the final language code.
rem Example graphic.bas
YABASIC dim x(9)
YABASIC dim y(9)
YABASIC for i = 0 to 9
YABASIC read x(i)
YABASIC read y(i)
YABASIC next i
SCRIBA import japi.bas
SCRIBA for i = 0 to 9
SCRIBA x[i]=(i+1)*10
SCRIBA if(even(i)) then
SCRIBA y[i]=10
SCRIBA else
SCRIBA y[i]=90
SCRIBA endif
SCRIBA next i
if( j_start() = J_FALSE ) then
print "can't connect to JAPI server"
end
endif
jframe = j_frame("Graphik Primitiven")
j_setsize(jframe,720,260)
canvas = j_canvas(jframe,700,230)
j_setpos(canvas,10,30)
j_show(jframe)
j_pack(jframe)
j_setnamedcolor(canvas,J_BLUE)
rem Normal
j_translate(canvas,10,10)
j_drawline(canvas,10,10,90,90)
j_drawstring(canvas,0,105,"Line")
j_translate(canvas,100,0)
SCRIBA j_drawpolygon(canvas,10,x,y)
YABASIC j_drawpolygon(canvas,10,x(),y())
j_drawstring(canvas,0,105,"Polygon")
j_translate(canvas,100,0)
j_drawrect(canvas,10,10,80,80)
j_drawstring(canvas,0,105,"Rectangle")
j_translate(canvas,100,0)
j_drawroundrect(canvas,10,10,80,80,20,20)
j_drawstring(canvas,0,105,"RoundRect")
j_translate(canvas,100,0)
j_drawcircle(canvas,50,50,40)
j_drawstring(canvas,0,105,"Circle")
print "6"
j_translate(canvas,100,0)
j_drawoval(canvas,50,50,40,20)
j_drawstring(canvas,0,105,"Oval")
j_translate(canvas,100,0)
j_drawarc(canvas,50,50,40,30,113,210)
j_drawstring(canvas,0,105,"Arc")
rem Filled
j_translate(canvas,-600,100)
SCRIBA j_drawpolyline(canvas,10,x,y)
YABASIC j_drawpolyline(canvas,10,x(),y())
j_drawstring(canvas,0,105,"Polyline")
j_translate(canvas,100,0)
SCRIBA j_fillpolygon(canvas,10,x,y)
YABASIC j_fillpolygon(canvas,10,x(),y())
j_drawstring(canvas,0,105,"FillPolygon")
j_translate(canvas,100,0)
j_fillrect(canvas,10,10,80,80)
j_drawstring(canvas,0,105,"FillRectangle")
j_translate(canvas,100,0)
j_fillroundrect(canvas,10,10,80,80,20,20)
j_drawstring(canvas,0,105,"FillRoundRect")
j_translate(canvas,100,0)
j_fillcircle(canvas,50,50,40)
j_drawstring(canvas,0,105,"FillCircle")
j_translate(canvas,100,0)
j_filloval(canvas,50,50,40,20)
j_drawstring(canvas,0,105,"FillOval")
j_translate(canvas,100,0)
j_fillarc(canvas,50,50,40,30,113,210)
j_drawstring(canvas,0,105,"FillArc")
while(j_nextaction()<>jframe)
wend
j_quit()
end
YABASIC data 10,10,20,90,30,10,40,90,50,10,60,90,70,10,80,90,90,10,100,90