Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type ItemStruct
- iVisible as integer
- pzName as zstring ptr
- end type
- dim aItem(7) as ItemStruct = { _
- (1,@"a banana") , (0,@"a flower"), (1,@"a bullet"), (0,@"a cape"), _
- (1,@"a tuxedo") , (0,@"an wristband"), (1,@"a soda"), (0,@"a marble") }
- dim as integer uLast(1), uCount=0
- print "you see ";
- for N as integer = 0 to 7
- if aItem(N).iVisible then
- if uCount > 1 then
- print *aItem(uLast(0)).pzName+", ";
- uLast(0) = uLast(1): uLast(1) = N
- else
- uLast(uCount) = N: uCount += 1
- end if
- end if
- next N
- if uCount = 0 then
- print "nothing."
- else
- print *aItem(uLast(0)).pzName;
- if uCount > 1 then
- print " and "+*aItem(uLast(1)).pzName
- end if
- end if
- sleep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement