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 - kservice

Pages: [1] 2
1
QB64 Discussion / Re: How to ensure accuracy of calculations
« on: October 18, 2021, 08:03:58 am »
OK. But what to do with unnecessary numbers after the comma?

2
QB64 Discussion / Re: How to ensure accuracy of calculations
« on: October 18, 2021, 05:40:03 am »
Thank you very much for prompt help. The theory is good, I am grateful for this lesson. But what to do in my constriction case? As I understood: 1) Instead of Single, use Double 2) Calculations to produce with integers, multiplying the initial number of previously, for example, by 10 or 100. I understood correctly?
I tried to multiply by 10 and 100. Received different results.

   [ You are not allowed to view this attachment ]  

In the first case, garbage is less, but it is more correct to use 100.

  [ You are not allowed to view this attachment ]  
But what to do with unnecessary numbers after the comma? Round And the actions are extra, and I am afraid of the appearance of errors. How to be?



3
QB64 Discussion / Re: How to ensure accuracy of calculations
« on: October 18, 2021, 05:37:36 am »
This seems to be a neverending story, just in the moment you forgot about the last math precision discussion, the next new member pops up the next one. No idea how many of those discussions are already in this forum.

It shows a simple human trait, we are lazy, too lazy to even take the time to carefully search, if our problems are already discussed before, it's much easier to start the 100th new thread on it.

And you know what, to get to this conclusion I don't even need extended math precision.

Waiting for the next math precision thread.....

I would be grateful if you just twist my nose. If I found the answer (the decision, and not theory! The causes of the problem were known to me) - I would not write here.

4
QB64 Discussion / How to ensure accuracy of calculations
« on: October 18, 2021, 01:48:02 am »
Faced the problem of accuracy of calculations. I bring an elementary example in which I have errors.

  [ You are not allowed to view this attachment ]  

It seems obvious that A2 = 0.8; B2 = 0.3; C2 = 0.4; d2 = 1.5; d = 2425301.5.
Why do I have such inaccurate results?

5
QB64 Discussion / Re: Programming errors on QB64
« on: October 12, 2021, 11:46:09 am »
The last problem is solved by the use of Field 2, 10 AS ...... and LSET .... instead of Print # 2, using "##############. ##

6
QB64 Discussion / Re: Programming errors on QB64
« on: October 10, 2021, 01:36:31 pm »
Refinement: String 2426 This is a string: Name F2 $ AS MID $ (F2 $, 1, Len (F2 $) - 3) + "BAK"
I noticed that if you make a Name "bigbad.txt" as "badwolf.txt", then this error disappears. But I need to use a conditional f2$, as each time they are different when using the procedure. In other words, I need this option: Name "f2$" AS "f2new$"

How can I get out of this position?
In QB45 it worked. Is it possible to find a solution option in QV64?

7
QB64 Discussion / Re: Programming errors on QB64
« on: October 10, 2021, 10:38:16 am »
When i try to rename an old file to file.bak and data records to a new file, I collided with such errors:
  [ You are not allowed to view this attachment ]    [ You are not allowed to view this attachment ]  
What can you suggest?

8
QB64 Discussion / Re: Programming errors on QB64
« on: October 10, 2021, 05:09:05 am »
Thank you, I will understand

9
QB64 Discussion / Re: Programming errors on QB64
« on: October 09, 2021, 01:10:36 pm »
I probably did something wrong if I stopped answering my questions? In this case, I ask the yen to apologize.

10
QB64 Discussion / Re: Russian language in QB64
« on: September 26, 2021, 05:46:29 pm »
I have already read all this, but I did not understand how to apply it in my situation. Tell me, please, how to adapt?
1. What data should I substitute in DATA?
2. Why values of symbol codes in the example do not coincide with the values that I see, for example, on en.wikipedia.org?
3. What kind of number system shows codes in the DATA field  (OCT, HEX, DEC .....?

11
QB64 Discussion / Re: Russian language in QB64
« on: September 26, 2021, 04:05:32 pm »
For other QB64 programming questions, yes, best to start a new topic in a new thread (post).

I would gladly closed the topic and moved to solving other issues. But still early. It turns out that to achieve the correct reproduction of Cyrillic in QB64 IDE is still half. After compiling and running a program to execute on the screen, instead of Cyrillic garbage. How do I understand it is irresistible?
  [ You are not allowed to view this attachment ]  

May be I Can  apply any other compiler?

12
QB64 Discussion / Re: Programming errors on QB64
« on: September 26, 2021, 02:19:05 pm »
It's clear. And what about an "IncorRect Array Type Passed to Sub" error ?

13
QB64 Discussion / Re: Programming errors on QB64
« on: September 26, 2021, 11:51:47 am »
In the  QB45 program i am used the FRE(-1) command. In QB64, this keyword is not supported. Something can be replaced?
Or here it is not necessary?

     And another question. I repeatedly use the functions of the form
Sub Chtenie1 (SKLSUM#, U$, f$, NB$, NE$, DT$, FRM$, RR, C, PP, tov() As Tovar).
Variable tov () AS Tovar is read from the f$ file. This is an array, in each row of which 4 pemet. But at the same time an
"IncorRect Array Type Passed to Sub" error occurs.
     How can this problem be solved?

14
QB64 Discussion / Re: Russian language in QB64
« on: September 26, 2021, 11:09:52 am »
It feels like CP866 and CP1251 encoding in the program are confused by places. In order for the text scored in NotePad ++ in Russian in the CP866 encoding, the IDE is correctly displayed in QB64 IDE in the CP866 encoding, it is necessary to pre-translate into the CP1251 encoding and only after that copy to QB64 IDE.

15
QB64 Discussion / Re: Programming errors on QB64
« on: September 25, 2021, 06:54:45 am »
Thanks to all for participation and advice. The program is large, many different functions that I combined into the plug-in file.
       Advise how to better make functions from this file? Can there be 2-3 connected files?
The program was created for many years ago for QB45 and now, when there is free time, trying to transfer to QB64. On QB45 everything worked. Here, apparently, checking over compiling more careful.
I'm trying to figure it out. So far not everything turns out. So I take a break. I am free from other cases - I will continue.
   Checked such a test variant - works without errors
  [ You are not allowed to view this attachment ]  

Pages: [1] 2