Author Topic: Can QBasic (MS Quick Basic) do Log operations?  (Read 2666 times)

0 Members and 1 Guest are viewing this topic.

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: us
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #25 on: March 06, 2025, 02:23:51 am »
How do you measure the total in dBm. I know you can measure the low and mid dBm separately but how did you measure the combined dBm with a meter?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20844
  • Country: gb
  • 0999
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #26 on: March 06, 2025, 08:16:50 am »
It was the QBasic which shipped with W95 DOS6.0 or possibly newer. I wrote tons of NEMA0182(3) diagnostic software for testing chartplotters and other devices needing particular data strings so I was familiar with the client. I do own a registered legal copy of MatLab so I ended up playing with the numbers in that client. I am still baffled by the fact that when Bebu did the number crunching having converted to voltage mid-step his numbers closely matched my metered results. All of the formulas say convert to power and add and when Bebu did that the numbers were not anywhere close to my real time measurements. My measurements were taken using the dBm mode as opposed to the dBV mode.
Try QB64. It can run most QBasic code unmodified.
https://qb64.com/
 

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 2360
  • Country: is
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #27 on: March 06, 2025, 04:11:57 pm »
LO IN Balanced    0----/\/\/\/\/\----0--------/\/\/\/\/\------0    HI IN Balanced
                                      R1        \              R3
                                                  /
                                                  \R5
                                        R2      /              R4
                                                  \
                              0 ---/\/\/\/\/\---0--------/\/\/\/\/\-------0

Low output impedance drive circuits.
Combined output taken from the ends of R5 and fed
to a differential amplifier Tektronix AM502 who's single
ended output went to a Tektronix DM502 who's internal
dBV/dBm jumper was set to dBm. All resistors 270 ohm.


Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: us
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #28 on: March 06, 2025, 05:17:11 pm »
LO IN Balanced    0----/\/\/\/\/\----0--------/\/\/\/\/\------0    HI IN Balanced
                                      R1        \              R3
                                                  /
                                                  \R5
                                        R2      /              R4
                                                  \
                              0 ---/\/\/\/\/\---0--------/\/\/\/\/\-------0

Low output impedance drive circuits.
Combined output taken from the ends of R5 and fed
to a differential amplifier Tektronix AM502 who's single
ended output went to a Tektronix DM502 who's internal
dBV/dBm jumper was set to dBm. All resistors 270 ohm.

I see you want to measure the combined power of the Low and Mid output in R5. However what you measured is a voltage and thus I think we should use dBm instead of power.
 

Offline mdijkens

  • Regular Contributor
  • *
  • Posts: 149
  • Country: nl
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #29 on: March 06, 2025, 05:27:47 pm »
It was the QBasic which shipped with W95 DOS6.0 or possibly newer. I wrote tons of NEMA0182(3) diagnostic software for testing chartplotters and other devices needing particular data strings so I was familiar with the client. I do own a registered legal copy of MatLab so I ended up playing with the numbers in that client. I am still baffled by the fact that when Bebu did the number crunching having converted to voltage mid-step his numbers closely matched my metered results. All of the formulas say convert to power and add and when Bebu did that the numbers were not anywhere close to my real time measurements. My measurements were taken using the dBm mode as opposed to the dBV mode.
Try QB64. It can run most QBasic code unmodified.
https://qb64.com/
qb64.com is not very active anymore
switch to https://qb64phoenix.com/ which continued where qb64 stopped  :)
 

Offline mwb1100

  • Frequent Contributor
  • **
  • Posts: 715
  • Country: us
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #30 on: March 06, 2025, 06:02:16 pm »
qb64.com is not very active anymore
switch to https://qb64phoenix.com/ which continued where qb64 stopped  :)

Link to the QB64 Phoenix github: https://github.com/QB64-Phoenix-Edition/QB64pe

It was kind of buried in the forum.
 

Offline CaptDonTopic starter

  • Super Contributor
  • ***
  • Posts: 2360
  • Country: is
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #31 on: March 06, 2025, 10:34:34 pm »
I like your emoji with action but you do realize when the switch closes it shorts out the battery???
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline mdijkens

  • Regular Contributor
  • *
  • Posts: 149
  • Country: nl
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #32 on: March 07, 2025, 11:58:46 am »
Yes of course, Best way to shut down a lamp  8)
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 513
  • Country: us
  • Miami, FL
    • Codernov Electronics Repair
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #33 on: March 07, 2025, 04:01:09 pm »
Ask chatgpt,

In QBASIC, logarithmic operations can be performed using the `LOG` function, which computes the natural logarithm (base e) of a number. If you need to compute logarithms with a different base, you can use the change of base formula:

\[
\log_b(x) = \frac{\log_e(x)}{\log_e(b)}
\]

Where:
- \( \log_b(x) \) is the logarithm of \( x \) to base \( b \),
- \( \log_e(x) \) is the natural logarithm (base e) of \( x \),
- \( \log_e(b) \) is the natural logarithm of \( b \).

Here's an example of how you can perform logarithmic operations in QBASIC:

### Example: Natural Logarithm (Base e)
```qbasic
CLS
DIM num AS SINGLE
num = 10
PRINT "Natural Logarithm of "; num; " is "; LOG(num)
END
```

### Example: Logarithm with a Different Base (e.g., Base 10)
```qbasic
CLS
DIM num AS SINGLE, base AS SINGLE
num = 100
base = 10
PRINT "Logarithm of "; num; " to base "; base; " is "; LOG(num) / LOG(base)
END
```

In this example:
- The first program calculates the natural logarithm of `10`.
- The second program calculates the logarithm of `100` to base `10` using the change of base formula.

Let me know if you need more details or help with QBASIC!
Notebook repairs, HAM radio modifications
https://www.youtube.com/@codernovUV-K5 firmware / @Telegram ///
 
The following users thanked this post: CaptDon

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 513
  • Country: us
  • Miami, FL
    • Codernov Electronics Repair
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #34 on: March 07, 2025, 04:01:40 pm »
But that language is 3 decades as dead. Use C++  :-//
Notebook repairs, HAM radio modifications
https://www.youtube.com/@codernovUV-K5 firmware / @Telegram ///
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1592
  • Country: us
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #35 on: March 07, 2025, 04:29:45 pm »
But that language is 3 decades as dead. Use C++  :-//

For the calculations the OP wanted I would use a spreadsheet like Excel. But I just run Quick Basic a minute ago. I don't know if it's dead.
 

Offline mdijkens

  • Regular Contributor
  • *
  • Posts: 149
  • Country: nl
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #36 on: March 07, 2025, 05:50:37 pm »
But that language is 3 decades as dead. Use C++  :-//

qb64phoenix is alive and kicking.
I've never stopped using Basic for my professional customers applications
 

Offline u666sa

  • Frequent Contributor
  • **
  • Posts: 513
  • Country: us
  • Miami, FL
    • Codernov Electronics Repair
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #37 on: March 07, 2025, 09:24:12 pm »
professional customers applications
Something like Delphi or C++Builder is what you need. Target Linux, Windows and MacOS, plus Android and iPhone, if you using FireMonkey. Rapid Application Development (RAD) IDE allows you to drag and drop your UI within minutes. Very powerful stuff.
Notebook repairs, HAM radio modifications
https://www.youtube.com/@codernovUV-K5 firmware / @Telegram ///
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20844
  • Country: gb
  • 0999
Re: Can QBasic (MS Quick Basic) do Log operations?
« Reply #38 on: March 08, 2025, 07:05:14 pm »
professional customers applications
Something like Delphi or C++Builder is what you need. Target Linux, Windows and MacOS, plus Android and iPhone, if you using FireMonkey. Rapid Application Development (RAD) IDE allows you to drag and drop your UI within minutes. Very powerful stuff.
QuickBasic and QBasic might be antiquated and no longer supported, but there's nothing wrong with BASIC. It's what many people here first learned to code, as it was commonly supplied on most home computers from the late 70s to early 90s.

Modern versions of BASIC are fairly comprehensive, can be compiled and run at a decent speed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf