Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bplus

Pages: [1] 2 3 ... 537
1
QB64 Discussion / Re: Cheerio, it's been fun
« on: April 16, 2022, 08:46:26 am »
Yeah things are a mess at moment, too bad, I know Luke has low tolerance of BS.

2
QB64 Discussion / Tip: get your pathed program file name
« on: April 15, 2022, 11:39:33 pm »
Code: QB64: [Select]
  1. PathedFile$ = Command$(0) 'or process commands sent
  2. Print PathedFile$
  3.  

  [ You are not allowed to view this attachment ]  

3
Programs / Re: QBJS - Import code from external .bas files
« on: April 15, 2022, 10:14:18 pm »
This project continues to impress! Good Stuff!

4
QB64 Discussion / Re: _FileExists not working with wildcards
« on: April 15, 2022, 04:57:02 pm »
Maybe you can ask the guy who suggested it to write you up a demo on how to do it?  ;D

OK this is what he came up with for Windows 10:
Attachment creates a safe folder to make and delete files, use exe's or edit and compile your own.

I did T*.txt instead of Trash*.txt
Code: QB64: [Select]
  1. shell _hide "del /f t*.txt"
  2.  

5
QB64 Discussion / Re: An introduction; A note on Wiki
« on: April 15, 2022, 01:12:37 pm »
So what does static do like that? Make all variables static?

6
QB64 Discussion / Re: An introduction; A note on Wiki
« on: April 15, 2022, 12:13:01 pm »
Welcome @dcromley

Are you talking about static for the whole sub or all the variables in it?
Was this something in earlier QB?

I know you can have Static variables in a Sub but I don't think that's what you mean.


7
QB64 Discussion / Re: SEEK # or not SEEK #
« on: April 15, 2022, 12:08:54 pm »
Why use seek with a sequential file, you have to worry about CR and LF chr$(13) chr$(10)... and an EOF marker too I think?

Sequential files best for variable length data.

8
QB64 Discussion / Re: _FileExists not working with wildcards
« on: April 15, 2022, 12:05:01 pm »
I would use a shell command to delete files with wildcards.

Really it's just one line of code? Why not that? Too easy!

9
QB64 Discussion / Re: _FileExists not working with wildcards
« on: April 14, 2022, 07:05:05 pm »
I would use a shell command to delete files with wildcards.


10
QB64 Discussion / Re: Small graphics programming challenge
« on: April 14, 2022, 11:41:35 am »
Attachment fixed.  Sorry for posting the message twice.  Mornings......

Yeah mornings, flag file names are the same.

11
QB64 Discussion / Re: Small graphics programming challenge
« on: April 14, 2022, 10:56:54 am »
Hi @Richard Frost

There is naming problem with the Flag files see attached snap
  [ You are not allowed to view this attachment ]  

12
Programs / Re: Better Bench by Ed Davis
« on: April 11, 2022, 05:01:12 pm »
   y = (-1 * Int((-1 * x * y) / 100)) + y0   <-- isn't a negative * negative = positive?  How is this any different from the ELSE case?

looks to me like this forces neg when one or the other is out of bounds but not both.

EDIT

13
Programs / Re: Better Bench by Ed Davis
« on: April 11, 2022, 04:57:54 pm »
Honestly I haven't done any analysis of code yet. I just know the first time I tried I didn't get what I was supposed to and when I made the substitution, the output came out right.

Can FB be so much faster?

Hey! Ed's here!

14
Programs / Better Bench by Ed Davis
« on: April 11, 2022, 04:15:53 pm »
Generic Basic code convert to QB64 by me for timing and Types:
Code: QB64: [Select]
  1. DefLng A-Z
  2. Dim As Double x, y, xx, yy, start
  3. start = Timer(.001)
  4. accum = 0
  5. count = 0
  6. While count < 1545
  7.     leftedge = -420
  8.     rightedge = 300
  9.     topedge = 300
  10.     bottomedge = -300
  11.     xstep = 7
  12.     ystep = 15
  13.  
  14.     maxiter = 200
  15.  
  16.     y0 = topedge
  17.     While y0 > bottomedge
  18.         x0 = leftedge
  19.         While x0 < rightedge
  20.             y = 0
  21.             x = 0
  22.             thechar = 32
  23.             xx = 0
  24.             yy = 0
  25.             i = 0
  26.             While i < maxiter And xx + yy <= 800
  27.                 xx = Int((x * x) / 200)
  28.                 yy = Int((y * y) / 200)
  29.                 If xx + yy > 800 Then
  30.                     thechar = 48 + i
  31.                     If i > 9 Then
  32.                         thechar = 64
  33.                     End If
  34.                 Else
  35.                     temp = xx - yy + x0
  36.                     If (x < 0 And y > 0) Or (x > 0 And y < 0) Then
  37.                         y = (-1 * Int((-1 * x * y) / 100)) + y0  ' << this line was revised in later post
  38.                     Else
  39.                         y = Int(x * y / 100) + y0
  40.                     End If
  41.                     x = temp
  42.                 End If
  43.  
  44.                 i = i + 1
  45.             Wend
  46.             x0 = x0 + xstep
  47.             accum = accum + thechar
  48.         Wend
  49.         y0 = y0 - ystep
  50.     Wend
  51.  
  52.     If count Mod 300 = 0 Then
  53.         Print accum,
  54.     End If
  55.     count = count + 1
  56.  
  57. Print accum
  58. Print Timer(.001) - start; " seconds"
  59.  
  60. 'This is the output:
  61.  
  62. ' 200574 60372774 120544974 180717174 240889374 301061574 309886830
  63.  
  64.  
I added DEFLNG A-Z and Dim as Double x, y, xx, yy
and I got below 10 secs on Timer with $Checking:Off, 9.61 was best time with everything turned off including Wifi.

Ed has QB64 down for 9.35 secs maybe on better machine...
http://basic4all.epizy.com/index.php?topic=21.msg166#msg166

Can anyone make a significant drop? FreeBasic at top at 1.09 secs

15
QB64 Discussion / Re: Highlight% changes by itself
« on: April 11, 2022, 03:27:11 pm »
Added this in to check running the subs for time:
Code: QB64: [Select]
  1.  If SelectedAnOption% = TRUE% Then
  2. ' debug check the selection code section
  3.             Cls
  4.             Print "You selected "; Highlight%
  5.             _Delay 2
  6.             SelectedAnOption% = FALSE%
  7.             HaltAndDisplay% = TRUE%
  8.  
  9. ' commented out next section, as not ready
  10.             'Select Case Highlight%
  11.             '    Case 1
  12.             '        Call FromNowUntil: SelectedAnOption% = FALSE%
  13.             '    Case 2
  14.  

Pages: [1] 2 3 ... 537