Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New and improved SICK project
#31
So you are not declaring an error, or just that it works?
Reply
#32
Thumbs Up 
Everything is fine at the moment.
Reply
#33
Here is the latest Sick program updates:

Code: (Select All)
Version v64.0a r8.0a:
  Improves opening/closing token (, [, and { in SwapData and Assignment.
  Adds some ; delimiter parsing to , tokens.
  Doubles the number of sound file extensions from 15 to 31.
Reply
#34
Now that QB64PE v4.0.0 has rolled out, here is a few Sick features:

Increases sound file support to 31 extensions, adds some _SndPlay support.

Removes $Unstable:Midi and $MidiSoundFont;Default

Thanks, Erik.
Reply
#35
Try this sample .sic program to display files:
Store as Filespec.sic not .bas
Code: (Select All)
10  color 15, 0
20  input "File spec", x$
30  gosub 300
40  f$=dir$(x$)
50  while len(f$)
60    color 14, 0
70    print f$;space$(13-len(f$));" ";
80    print filedate(f$);" ";filetime(f$);" ";
90    if and(fileattr(f$),010h)=010h then
100      r=r+1
110      print "<dir>"
120    else
130      print formatS$(filesize(f$))
140      q=q+1
150    endif
160    x=x+filesize(f$)
170    z=z+1
180    if z=21 then
190      gosub 340
200      z=0
210      gosub 300
220    endif
230    f$=dir$("")
240 wend
250 if z then
260    gosub 340
270 endif
280 gosub 480
290 end
300 color 15, 0
310 print "filename.ext  date      time    size"
320 print "------------------------------------------"
330 return
340 color 15, 0
350 print "-more-";
360 do
370    z$=inkey$
380    if len(z$) then
390      exit do
400    endif
410 loop
420 print
430 if lcase$(z$)="n" Then
440    gosub 480
450    end
460 endif
470 return
480 print "Total dirs ";r
490 print "Total files ";q
500 print "Total bytes ";formatS$(x)
510 return


Attached Files
.zip   FILESPEC.ZIP (Size: 633 bytes / Downloads: 34)
Reply
#36
Try this sample .sic program to display primes and factors:
Store as Prime.sic not .bas 

Code: (Select All)
10  if stdinenabled then
20    r=10
30    goto 110
40  endif
50  print "Enter upper prime";
60  input r
70  r=int(r)
80  if r<2 then
90    end
100 endif
110 z=2
120 print " 2 = (prime)" ' first prime is 2
130 do until z>=r ' display factored numbers
140    x$=inkey$
150    if x$=chr$(27) Then
160      end
170    endif
180    z=z+1
190    x=z
200    print x;"=";
210    l=1
220    q=0
230    do until x=1
240      l=l+1
250      do while mod(x,l)=0 ' continue to divide number
260          q=q+1
270          if q>1 then
280            print " *";
290          endif
300          print l;
310          x=x/l
320      loop
330      if l>int(z/2) then ' test for maximum divisor
340          exit do
350      endif
360      if l>int(sqr(x)) then ' test maximum divisor is prime
370          if q=0 then
380            exit do
390          endif
400      endif
410    loop
420    if q=0 then ' display number is prime
430      print " (prime)";
440    endif
450    print
460 loop
470 stop


Attached Files
.zip   PRIME3.ZIP (Size: 600 bytes / Downloads: 26)
Reply




Users browsing this thread: 1 Guest(s)