Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
plotting shapes not working
#6
First, thanks everyone for your replies!

(10-21-2025, 02:53 PM)SMcNeill Wrote: Isn't your coordinates reversed?
Sub PlotPoint (Y As Integer, X As Integer, S As String, MyArray() As String * 1)
Sub PlotSemiCircle (XC As Integer, YC As Integer, R As Integer, Q As Integer, S As String, MyArray() As String * 1)
One is X/Y, then the other is Y/X, and somewhere along the brain my mind is bugging out.  LOL

Are they?? I'll check that in a minute.

(10-21-2025, 03:02 PM)SMcNeill Wrote: And can I ask about these statements -- this is just making my OCD twitch, and I didn't even know I *had* OCD:
If Err >= 1 And Err <= 1 Then
...
My brain is hurting.  This code is twitching my eyebrows.  LOL!!

Ha! Sorry to hurt your brain! I was trying to debug something that was blowing up, and wanted a quick & dirty way to see the error message without having to look up the codes. Some of the errors had a range (e.g., 502 to 518 = Out of memory) and I was feeling lazy, so I generated that code by copying the tables from the QB64PE error codes page into Excel, then using a SUBSTITUTE formula to fill in the values, and the fastest path was to simply do a "one size fits all" template, even where there was only one value.
[Image: qb64pe-lazy-error-message-code-generator.png]

(10-21-2025, 05:46 PM)bplus Wrote: OMG error handling galore! 
I learned early on there is NO WAY to anticipate all the fool errors that could happen and attempting to code for even a likely majority was a boring nightmare.
The solution is simple, make no errors and inform users as best you can what info you are looking to get and how it will be used and allow for some intelligence from your user.

I agree. This wasn't for a user, this was me grasping for straws trying to debug some puzzling errors. At this point I don't remember what it was, but it eventually got fixed.

(10-21-2025, 08:58 PM)Petr Wrote: I assume the error is in the wrong use of data types. Are you really using the INTEGER data type for decimal numbers?

I think that is probably likely... Where is this happening? I basically copied this code from all over the place and it seemed to work in the past... You know that saying, if it ain't broke? I don't think that covers the case where it wasn't broke but then you broke it!

Anyway, I'll check the data types and the parameter order. Thanks again y'all...
Reply


Messages In This Thread
plotting shapes not working - by madscijr - 10-21-2025, 02:38 PM
RE: plotting shapes not working - by SMcNeill - 10-21-2025, 02:53 PM
RE: plotting shapes not working - by SMcNeill - 10-21-2025, 03:02 PM
RE: plotting shapes not working - by bplus - 10-21-2025, 05:46 PM
RE: plotting shapes not working - by Petr - 10-21-2025, 08:58 PM
RE: plotting shapes not working - by madscijr - 10-21-2025, 11:26 PM
RE: plotting shapes not working - by SMcNeill - 10-22-2025, 05:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  why isn't _FULLSCREEN working? madscijr 5 541 09-20-2025, 01:47 AM
Last Post: SMcNeill
  I'm working on an old MS-DOS thingy... KlamPs 2 520 08-25-2025, 09:43 AM
Last Post: hsiangch_ong
  blue circle isn't drawing and print isn't working? madscijr 12 2,360 09-21-2024, 06:13 PM
Last Post: madscijr
  Updating Clock at a different rate to program loop-example not working as expected? dowster 1 620 08-15-2024, 12:06 PM
Last Post: luke
  Spanish accented chars not working Ikerkaz 2 779 03-14-2024, 02:41 PM
Last Post: Ikerkaz

Forum Jump:


Users browsing this thread: 1 Guest(s)