I'm importing an old BDv1 program into Dark Basic Pro, I have gone threw all the commands making sure there are no removed commands in the code
On compilation the compiler runs to the second pass (Building Executable) then crashes...
'DBPCompiler.exe has encountered a problem and needs to close. We are sorry for the inconvenience.'
AppName: dbcompiler.exe
AppVer: 1.0.0.0
ModName: dbcompiler.exe
ModVer: 1.0.0.0
Offset: 0000242a
Theres no other help whatsoever as to what has caused the crash, I'm running XP Pro on an 1800XP AMD system
Has anyone else had problems converting there old DBv1 programes over? If so could you give me a clue as to whats causing the error
`#include "magicload1-1.dba"
DISABLE ESCAPEKEY
if CHECK DISPLAY MODE(1024, 768, 16)= 1
SET DISPLAY MODE 1024, 768, 16
rez=1024
rez2=768
else
set display mode 800,600,16
rez=800
rez2=600
endif
NoButts=rez/34
key$=""
Swp$=""
sync on
cls
sync
ink 0,0
newdata=0
Ambient=70
set ambient light Ambient
`SET POINT LIGHT 0, 0, 0, 0
COLOR LIGHT 0, rgb(125,125,125)
SET DIRECTIONAL LIGHT 0, 0, -1, 0
hide light 0
AUTOCAM OFF
HIDE MOUSE
LOAD MUSIC "Music\Start.mid", 1
load music "music\melow.mid", 2
load sound "sounds\Click2.wav",1
load sound "sounds\Aaaarggg.wav",2
`gosub _ReadPanel
dim bits(30)
NoF=1
Dim FNames$(Nof)
grav=1
maxob=200
reserved=10
rem a array for saving complex objects
dim a_name$(maxob)
dim a_mesh(maxob)
dim a_coll(maxob)
dim a_xoffset#(maxob)
dim a_yoffset#(maxob)
dim a_zoffset#(maxob)
dim a_scale(maxob)
dim a_ghost(maxob)
dim a_xrot(maxob)
dim a_yrot(maxob)
dim a_zrot(maxob)
dim a_anim1(maxob)
dim a_anim2(maxob)
dim a_animlooped(maxob)
dim a_Wireframe(maxob)
dim a_BlackTransp(maxob)
dim a_Cull(maxob)
dim a_Filter(maxob)
dim a_Horis(maxob)
dim a_Vert(maxob)
dim a_TexScale(maxob)
dim a_frame(maxob)
dim a_Fade(maxob)
` ------------------------
dim b_panelX(20)
dim b_panelY(20)
dim b_panelOn(20)
dim b_panelX2(20)
dim b_panelY2(20)
dim b_panelred(20)
dim b_panelgreen(20)
dim b_panelblue(20)
dim b_buttons(20,20)
`=============FILESELECTOR STUFF============
load bitmap "sys\SYSFileSelector.bmp",30
FSWidth=bitmap WIDTH(30)
FSHeight=bitmap height(30)
set current bitmap 30
GET IMAGE 5, 0, 0, FSWidth, FSHeight
set current bitmap 0
delete bitmap 30
FSWidth2=(rez/2)-(FSwidth/2)
FSHeight2=(rez2/2)-(FSHeight/2)
FSString$="Load Complex Object"
`=========================
Sat=100
gosub _loadButtons
restore buttons
read maxbuttons
dim ButtonX(maxbuttons)
dim ButtonY(maxbuttons)
dim Button(MaxButtons)
dim HelpTxt$(maxbuttons)
xx=0
yy=0
for i=1 to maxbuttons
if xx>=nobutts
inc yy
xx=0
endif
ButtonX(i)= xx*34
ButtonY(i)= yy*33
read Button(i), HelpTxt$(i)
inc xx
next i
for i=20 to 23
SET SPRITE i, 0,0
next i
sprite 20, fswidth2+257, fsheight2+2*40, 106
sprite 21, fswidth2+257, fsheight2+4*40, 107
sprite 22, FSWidth2+257, FSHeight2+5*40, 104
sprite 23, FSWidth2+257, FSHeight2+6*40, 125
for i=20 to 23
hide sprite i
next i
`------------------------------------------
restore Help2
read o
dim Helptxt2$(o)
for i=1 to o
read helptxt2$(i)
next i
`-------------------------------------------
dim pointerx(5)
dim pointery(5)
gosub _loadpointer
set current bitmap 0
gosub _DoSky
gosub _DoFloor
FName$="Blank.dim"
at=1
gosub _ReadObjects
`*************************
gosub _GetManTex
`*************************
subobject=reserved+1
maxobs=reserved+1
rem head slightly down
`ax=4
rem human height#
height#=25
weight#=0
ypos#=height#
position camera 1500,0,1500
rem position object 4,0,0,0
rem scale object 4,3600,3600,3600
backdrop off
DRAW TO FRONT
On$="(ON)"
Off$="(OFF)"
rem animate door
rem loop object 3
rem position object 10, 0, 0, 0
`stop music 1
play music 2
gosub _ReadButtonPos
gosub _PutButtons
_MainLoop:
repeat
Mx=Mousex()
My=MouseY()
rem delete this prints
set cursor 0,10
mon=SPRITE COLLISION(10, 0)
help$=""
if mon>=100
Help$=helptxt$(mon-99)
else
if mon >=20
help$=Helptxt2$(mon-19)
endif
endif
gr$=on$
if mon=100 and grav=0 then gr$=Off$
if mon=120 and a_BlackTransp(subobject-reserved)=1 then gr$=Off$
if mon=121 and a_Cull(subobject-reserved)=0 then gr$=Off$
if mon=122 and a_Filter(subobject-reserved)=0 then gr$=Off$
if mon=100 or mon=120 or mon=121 or mon=122 or mon=128
help$=help$+gr$
endif
if mon=127 then help$=help$+ " "+ str$(a_Fade(subobject-reserved))
print
print
print "Mouse X: ";mx;" Y: ";my;" Sprite: ";mon;" FPS ";SCREEN FPS()
print "scancode : ";scancode();" Object ";subobject-reserved-newdata;" of ";MAXOBJECTS-RESERVED-newdata
print "Ambient Light = ";Ambient;" Object : ";a_name$(subobject-reserved)
print "";help$
gosub _DoCamera
gosub _Controll
if TOTAL OBJECT FRAMES(subobject)=0
hide sprite 115
else
show sprite 115
endif
if char=1
show sprite 130
show sprite 131
else
hide sprite 130
hide sprite 131
endif
inc blink
if blink>30 then blink=0
if newdata=0
if blink0 and frst=1
for i=20 to 23
show sprite i
next i
frst=0
else
frst=1
endif
if fselector0
ink rgb(255,255,255),rgb(255,255,255)
paste image 5, FSWidth2, FSHeight2
CENTER TEXT rez/2, fsheight2+15, FSString$
i=FileAt
o=1
while i=0
` tt=at+reserved+tmp-1
tt=at+tmp-1
a_xoffset#(i)=a_xoffset#(i)+a_xoffset#(tt)
a_yoffset#(i)=a_yoffset#(i)+a_yoffset#(tt)
a_zoffset#(i)=a_zoffset#(i)+a_zoffset#(tt)
a_xrot(i)=a_xrot(i)+a_xrot(tt)
a_yrot(i)=a_yrot(i)+a_yrot(tt)
a_zrot(i)=a_zrot(i)+a_zrot(tt)
endif
endif
flags$=BIN$(flags)
gosub _Swapflags
if version>=3
a_ghost(i)=val(mid$(flags$,1))
a_animlooped(i)=val(mid$(flags$,2))
else
a_ghost(i)=0
a_animlooped(i)=0
endif
if version>=4
a_Wireframe(i)=val(mid$(flags$,3))
a_BlackTransp(i)=val(mid$(flags$,4))
a_Cull(i)=val(mid$(flags$,5))
a_Filter(i)=val(mid$(flags$,6))
else
a_Wireframe(i)=1
a_BlackTransp(i)=1
a_Cull(i)=1
a_Filter(i)=1
endif
if version>=5
read byte 2,a_horis(i)
read byte 2,a_vert(i)
read byte 2,a_texscale(i)
read byte 2,a_frame(i)
else
a_horis(i)=0
a_vert(i)=0
a_texscale(i)=0
a_frame(i)=0
endif
if version>=6
read long 2,a_Fade(i)
else
a_Fade(i)=100
endif
next i
newdata=0
endif
close file 2
gosub _reset
return
`================================
_reset:
O_No=reserved+1
for i=O_No+1 to maxob
if object exist(i) then delete object i
next i
for i=1 to maxob
if a_name$(i)"" and FILE EXIST(a_name$(i))=1
load object a_name$(i), O_No
fix object pivot O_No
` a_mesh(i)=O_No
if a_coll(i)=0
set object collision off O_No
else
set object collision on O_No
endif
if a_coll(i)=1 then set object collision to boxes O_No
if a_coll(i)=2 then set object collision to spheres O_No
if a_coll(i)=3 then set object collision to polygons O_No
if a_ghost(i)=1 then ghost object on O_No
position object O_No, a_xoffset#(i), a_yoffset#(i), a_zoffset#(i)
XROTATE OBJECT O_No, wrapvalue(a_xrot(i))
YROTATE OBJECT O_No, wrapvalue(a_yrot(i))
ZROTATE OBJECT O_No, wrapvalue(a_zrot(i))
SCALE OBJECT O_No, a_scale(i), a_scale(i), a_scale(i)
if a_animlooped(i)=1 then loop object O_No
m#=( a_horis(i)/100.0)
m2#=( a_vert(i)/100.0)
SCROLL OBJECT TEXTURE O_No, m#, m2#
m#=1.0+ (a_TexScale(i) / 100.0)
SCALE OBJECT TEXTURE O_No, m#, m#
set OBJECT FRAME O_No, a_frame(i)
SET OBJECT O_No, a_Wireframe(i), a_BlackTransp(i), a_Cull(i), a_Filter(i)
fade object O_No, a_Fade(i)
` fix object pivot O_No
` a_xrot(i)=0
` a_yrot(i)=0
` a_zrot(i)=0
inc O_No
endif
next i
return
`===================================
_Controll:
if FSelector
key$=INKEY$()
if asc(key$) > 32 and asc(key$) =1
fname$=left$(fname$,len(fname$)-1)
endif
while inkey$()""
ENDWHILE
endif
if newobject=0
mob=subobject-reserved
endif
mouseb=MOUSECLICK()
if KEYSTATE(59)=1
` move controlls with F1
if mouseb0 and mon >=sat
t=(mon-sat)+1
buttonx(t)=int(mx/5) * 5
buttony(t)=int(my/5) * 5
sprite mon,buttonx(t),buttony(t), SPRITE IMAGE(mon)
endif
else
if mouseb0
if butbut=MaxBut
gosub _MouseClick
if butbut 0 then SET OBJECT FRAME maxobjects, 0
fix object pivot maxobjects
a_name$(mas)=bName$
a_xrot(mas)=0
a_yrot(mas)=0
a_zrot(mas)=0
a_xoffset#(mas)=CAMERA POSITION X()
a_yoffset#(mas)=CAMERA POSITION Y()
a_zoffset#(mas)=CAMERA POSITION Z()
a_scale(mas)=100
a_ghost(mas)=0
a_coll(mas)=1
a_anim1(mas)=0
a_anim2(mas)=0
a_animlooped(mas)=0
a_Wireframe(mas)=1
a_BlackTransp(mas)=1
a_Cull(mas)=1
a_Filter(mas)=1
a_horis(mas)=0
a_vert(mas)=0
a_texscale(mas)=0
a_frame(mas)=0
a_Fade(mas)=100
if newdata0
show object maxobjects
endif
subobject=maxobjects
newdata=0
set object frame maxobjects,0
position object maxobjects, a_xoffset#(mas), a_yoffset#(mas), a_zoffset#(mas)
XROTATE OBJECT maxobjects, wrapvalue(a_xrot(mas))
YROTATE OBJECT maxobjects, wrapvalue(a_yrot(mas))
ZROTATE OBJECT maxobjects, wrapvalue(a_zrot(mas))
GOSUB _CHARCHECK
endif
endif
if FSelector=103
`add complex
dName$="DIM\"+fname$
if file exist(dName$)=1
ok=1
at=(maxobjects-reserved)+1
tmax=maxobjects
gosub _ReadObjects
endif
endif
if FSelector=102
`load
dName$="DIM\"+fname$
if file exist(dName$)=1
ok=1
at=1
gosub _ReadObjects
endif
endif
if FSelector=101
` SAVE
version=7
dName$="DIM\"+fname$
if upper$(right$(dName$,4)) ".DIM" then dName$=dName$+".dim"
if file exist(dName$)=1
delete file dName$
endif
open to write 2,dName$
write long 2,version
max=maxobjects-reserved
write long 2,max
for i=1 to max
flags= (a_ghost(i)) + ( (a_animlooped(i)) * 2)
write string 2,a_name$(i)
write byte 2,a_coll(i)
write float 2,a_xoffset#(i)
write float 2,a_yoffset#(i)
write float 2,a_zoffset#(i)
write byte 2,a_scale(i)
write long 2,a_xrot(i)
write long 2,a_yrot(i)
write long 2,a_zrot(i)
write long 2,a_anim1(i)
write long 2,a_anim2(i)
flags=flags + ( ( a_Wireframe(i)) *4) + ( ( a_BlackTransp(i)) *8)
flags=flags + ( ( a_Cull(i)) *16) + ( ( a_Filter(i)) * 32)
write byte 2,flags
write byte 2,a_horis(i)
write byte 2,a_vert(i)
write byte 2,a_texscale(i)
write byte 2,a_frame(i)
write long 2,a_Fade(i)
next i
close file 2
ok=1
endif
if ok=0 then play sound 2
return
_GetObjects:
undim FNames$(NoF)
NoF=maxob
Dim Fnames$(NoF)
Frst=0
for i=1 to maxob
FNames$(i)=a_name$(i)
if a_name$(i)="meshes\"
if frst=0
frst=1
Files=i-1
endif
endif
next i
` files=maxob
return
_MouseClick:
mob=subobject-reserved
` ********* snapshot ********
if mon=136
fn=0
for i=0 to 1000
fn$="Screenshots\Snap"+ str$(i)+".jpg"
if FILE EXIST(fn$)=0
goto _foundit
endif
next i
_foundit:
SAVE BITMAP fn$
endif
` ******** replace object *******
if mon=135
FSelector=mon
FSString$="Replace Object .3ds"
FSearch$=".\meshes"
Flook$=".3ds"
gosub _GetFiles
FileAt=1
Fname$=FNames$(1)
endif
`********* Delete Object ********
if mon=134 and maxobjects>reserved+1
a_name$(mob)=""
remstart
for i=mob to maxob-1
a_name$(i)=a_name$(i+1)
a_mesh(i)=a_mesh(i+1)
a_coll(i)=a_coll(i+1)
a_xoffset#(i)=a_xoffset#(i+1)
a_yoffset#(i)=a_yoffset#(i+1)
a_zoffset#(i)=a_zoffset#(i+1)
a_scale(i)=a_scale(i+1)
a_ghost(i)=a_ghost(i+1)
a_xrot(i)=a_xrot(i+1)
a_yrot(i)=a_yrot(i+1)
a_zrot(i)=a_zrot(i+1)
a_anim1(i)=a_anim1(i+1)
a_anim2(i)=a_anim2(i+1)
a_animlooped(i)=a_animlooped(i+1)
a_Wireframe(i)=a_Wireframe(i+1)
a_BlackTransp(i)=a_BlackTransp(i+1)
a_Cull(i)=a_Cull(i+1)
a_Filter(i)=a_Filter(i+1)
a_Horis(i)=a_Horis(i+1)
a_Vert(i)=a_Vert(i+1)
a_TexScale(i)=a_TexScale(i+1)
a_frame(i)=a_frame(i+1)
a_Fade(i)=a_Fade(i+1)
next i
remend
dec maxobjects
if subobject>maxobjects then subobject=maxobjects
gosub _reset
endif
`********* Select object ********
if mon=133
`add complex
FSelector=mon
FSString$="Select Object"
gosub _GetObjects
FileAt=1
Fname$=a_name$(1)
endif
`********* to last object ********
if mon=132 and mob>reserved+1
a_xoffset#(mob)=a_xoffset#(mob-1)
a_yoffset#(mob)=a_yoffset#(mob-1)
a_zoffset#(mob)=a_zoffset#(mob-1)
a_xrot(mob)=a_xrot(mob-1)
a_yrot(mob)=a_yrot(mob-1)
a_zrot(mob)=a_zrot(mob-1)
endif
`********* texture man ********
if mon=131 and char=1
LOOP OBJECT subobject, 0,TOTAL OBJECT FRAMES(subobject)-1
endif
if mon=130 and char=1
texture limb subobject,EYES,1100+RND(bits(2))
texture limb subobject,CHIN,1000+RND(bits(1))
texture limb subobject,NOSE,1200+RND(bits(3))
endif
`********* to camera ********
if mon=129
MOVE CAMERA 10
a_xoffset#(mob)=CAMERA POSITION X()
a_yoffset#(mob)=CAMERA POSITION Y()-height#
a_zoffset#(mob)=CAMERA POSITION Z()
MOVE CAMERA -10
endif
`********* to object ********
if mon=128
xpos=a_xoffset#(mob)
ypos=a_yoffset#(mob)
zpos=a_zoffset#(mob)
POSITION CAMERA xpos,ypos,zpos
move camera -10
endif
`************ Object Ambient *************
if mon=127
if keystate(211)=1
a_fade(mob)=0
else
if mouseb=1
a_Fade(mob)=a_Fade(mob)+1 +(9 * shiftkey() )
else
a_Fade(mob)=a_Fade(mob)-1 -(9 * shiftkey() )
endif
endif
` if a_Fade(mob)>500 then a_Fade(mob)=500
` if a_Fade(mob)TOTAL OBJECT FRAMES(subobject) then a_frame(mob)=TOTAL OBJECT FRAMES(subobject)
set OBJECT FRAME subobject, a_frame(mob)
endif
`*********** Scale tex **************
if mon=125
if mouseb=1
a_texScale(mob)=a_texscale(mob)+1
m#=1.01
else
a_texscale(mob)=a_texscale(mob)-1
m#=.99
endif
if keystate(211)=1
a_texscale(mob)=0
endif
if a_texscale(mob)>=120 then a_texscale(mob)=120
if a_texscale(mob)=100 then a_horis(mob)=0
if a_horis(mob)=100 then a_vert(mob)=0
if a_vert(mob)0 then play sound 1
`******************* FILE SELECTOR ****************
if fselector0
if mon=20
if mouseb=1
dec FileAt
else
dec fileat,17
endif
if fileatfiles then fileat=files
fname$=fnames$(fileat)
FileOn=FileAt
endif
if mon=22
fselector=0
for i=20 to 23
hide sprite i
next i
endif
if mon=23
gosub _FSelectorResult
fselector=0
endif
if mx>=fswidth2+15 and mx=1 and (fileat + fony - 1)=0 then dec Ambient
endif
SET AMBIENT LIGHT Ambient
endif
`******* sub object change **********
if mon=111
if mouseb=1
inc subobject
else
dec subobject
endif
if subobject > maxobjects then subobject=maxobjects
if subobject 50 then ax=50
ay=wrapvalue(ay)
xrotate camera wrapvalue(ax)
yrotate camera ay
atx#=camera position x()
atz#=camera position z()
aty#=get ground height(1,atx#,atz#)+ height#
rem simulate fly with '+' and gravity
if keystate(78)=1
if ypos#0
dec ypos#,gravity#
if gravity#0 then dec ypos#,3
endif
position camera atx#,aty#+ypos#,atz#
rem position sky and scroll clouds
POSITION LIGHT 0,atx#,ypos#,atz#
position object 1,atx#,ypos#-ms35,atz#
position object 2,atx#,ypos#-ms35-200,atz#
` position object 1,atx#,ypos#-(maxsize/2),atz#
scroll object texture 1,.0008,.0008
scroll object texture 2,.0005,.0005
return
_DoSky:
maxsize=10000
ms35=maxsize/2.5
SET CAMERA RANGE 1, maxsize*2
if fog available()=1
` fog on
fog distance maxsize+2000
fog color rgb(255,255,255)
endif
` load image "meshes\sky.bmp",1
` make object sphere 1,maxsize-100
` set object 1,1,1,0,1,1,1
` texture object 1,1
load object "meshes\sky1.3ds",1
m=maxsize/2
scale object 1,m*2,m,m*2
fade object 1,0-(maxsize)
set object collision off 1
` dec m,200
load object "meshes\sky1.3ds",2
fade object 2,0-(maxsize)
scale object 2,(m*2)-200,m-200,(m*2)-200
set object collision off 2
ghost object on 2
` XROTATE OBJECT 1, 180
return
_DoMan:
SET OBJECT TO CAMERA ORIENTATION 3
return
_MakeMan:
make object CUBE 3,10
set object 3,1,1,1,1
scale object 3,100,300,100
set object collision on 3
return
_GetManTex:
restore ManTex
o=1
repeat
read t$,num
i=0
n$="meshes\"+ t$ + right$( "00" + str$(i),2 )+".bmp"
while file exist(n$)
load bitmap n$,1
get image num,0,0,BITMAP WIDTH(1),BITMAP HEIGHT(1)
delete bitmap 1
inc i
inc num
n$="meshes\"+ t$ +right$( "00" + str$(i),2 )+".bmp"
endwhile
bits(o)=i-1
inc o
until t$="**"
return
mantex:
data "manM",1000,"ManE",1100,"ManN",1200,"**",0
_DoFloor:
rem temp floor
make matrix 1,maxsize*2,maxsize*2,70,70
load bitmap "meshes\floor1.bmp",1
get image 2,0,0,256,256
delete bitmap 1
` randomize matrix 1,25
prepare matrix texture 1,2,2,2
SET MATRIX 1, 1, 1, 1, 1, 1, 1, 1
`MagicLoad("test.mwdb",1,2000,1)
` GHOST MATRIX ON 1
return
` ============================== COMMMON FUNCTIONS & SUB'S =============================
FUNCTION CountFiles(dirName$)
NoFiles=0
set dir dirName$
find first
while get file type() -1
if get file type()=0 then inc NoFiles
find next
endwhile
set dir "..\"
ENDFUNCTION NoFiles
_GetFiles:
undim FNames$(NoF)
NoF=countfiles(Fsearch$)
Dim Fnames$(NoF)
set dir Fsearch$
Files=1
find first
while get file type() -1
if get file type()=0
if upper$(right$(get file name$(),4))=upper$(Flook$) or flook$=""
Fnames$(Files)=get file name$()
inc Files
endif
endif
find next
endwhile
set dir "..\"
dec Files
return
_LoadPointer:
load bitmap "sys\SYSSword.bmp",31
set current bitmap 31
SNo=10
` sprites 10-19 are sword pointer
for i=0 to 8
get image SNo,i*37,0,(i*37)+37,37
SET SPRITE SNo, 0,1
inc SNo
next i
set current bitmap 0
sync
delete bitmap 31
return
_LoadButtons:
create bitmap 31,374,857
load bitmap "sys\SYSIcons.bmp",31
set current bitmap 31
SNo=SAt
for o=0 to 24
for i=0 to 10
get image SNo,i*34,o*33,(i*34)+34,(o*33)+33
SET SPRITE SNo, 0,0
inc SNo
next i
next o
set current bitmap 0
sync
delete bitmap 31
return
_PutButtons:
i=1
while i0 or i>len(sr$)
ENDFUNCTION Pos
function getval(Stri$)
stri$=upper$(stri$)
repeat
read string 3,f$
f$=upper$(f$)
chrat=instr("=",f$)
ft$=left$(f$,chrat)
until ft$=Stri$ or FILE END(3)=1
endfunction val(right$(f$,len(f$)-chrat))
_ReadPanel:
open to read 3,"panel.ini"
while file end(3)1
gosub _repeatPanel
endwhile
close file 3
return
_repeatPanel:
panelNo=getval("panel=")
if file end(3)=1 then goto Edd1
b_panelx(panelNo)=getval("x=")
if file end(3)=1 then goto Edd1
b_PanelY(panelNo)=getval("y=")
if file end(3)=1 then goto Edd1
b_Panelx2(panelNo)=getval("x2=")
if file end(3)=1 then goto Edd1
b_Panely2(panelNo)=getval("y2=")
if file end(3)=1 then goto Edd1
b_panelred(panelNo)=getval("red=")
if file end(3)=1 then goto Edd1
b_panelgreen(panelNo)=getval("green=")
if file end(3)=1 then goto Edd1
b_panelblue(panelNo)=getval("blue=")
if file end(3)=1 then goto Edd1
`
Edd1:
return
_ReadButtonPos:
open to read 3,"Buttons.ini"
repeat
ButsRez=getval("Rez=")
if file end(3)=1 then goto ret1
until butsrez=rez
NoButts=getval("Buttons=")
ix=1
while ix