Search found 6 matches

by EkriirkE
Tue Nov 17, 2020 7:15 pm
Forum: QBasic / QuickBasic related
Topic: Why Do I Get Subscript Errors Here?
Replies: 4
Views: 4842

Re: Why Do I Get Subscript Errors Here?

Lewis-H wrote: Tue Nov 17, 2020 2:26 pm Irrelevant garbage
I think you're lost
by EkriirkE
Sun Aug 07, 2016 2:53 am
Forum: QBasic / QuickBasic related
Topic: Modulus
Replies: 2
Views: 2517

Re: Modulus

Use CLNG() instead of INT()
Alternatively, try bit masking to eliminate remainders and their rounding errors, e.g.


IP1=(IP AND &HFF&)
IP2=(IP AND &HFF00&) / &H0100&
IP3=(IP AND &HFF0000&) / &H010000&
IP4=(IP AND &HFF000000&) / &H01000000&
by EkriirkE
Sat Aug 06, 2016 7:06 am
Forum: QBasic / QuickBasic related
Topic: terminal.bas
Replies: 1
Views: 2416

Re: terminal.bas

I believe DOS can only see COM ports 1-4, has windows assigned it a higher #?
Also, are you sending a carriage return CHR$(13) at the end of each command?

Check out the `change port` command as well: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ts_cmd_changeport ...
by EkriirkE
Sat Aug 06, 2016 6:53 am
Forum: QBasic / QuickBasic related
Topic: Why Do I Get Subscript Errors Here?
Replies: 4
Views: 4842

Re: Why Do I Get Subscript Errors Here?

Max variable size is 64K (65534) bytes, or 32K (32766) elements as noted.
You aren't assigning `spots` a variable type, so it is 4-byte wide double I believe.
Plus that is a multi-dimensional array so in reality you are trying to allocate 60000 elements of 4 bytes each (2, 20000) = 3 * 20001. Thus ...
by EkriirkE
Sat Aug 06, 2016 5:27 am
Forum: QBasic / QuickBasic related
Topic: Create and test for blank and null string. AND condition
Replies: 2
Views: 2347

Re: Create and test for blank and null string. AND condition

Just so you know, QB does not use null-terminated strings. So if you mean an empty string by "null string" then simply assign the value of "" to it:
MyString$ = ""

If you're looking to create a "buffer", a quick way is the SPACE$() function
MyString$ = SPACE$(10)

Your AND statement is ...
by EkriirkE
Sat Aug 06, 2016 5:16 am
Forum: QBasic / QuickBasic related
Topic: access windows files from dos 6.22
Replies: 1
Views: 1574

Re: access windows files from dos 6.22

Try using DosBox and it's `mount` command instead of a virtual machine. It's far far easier and far less resource intensive than a VM. A VM usually can only show physical disks and disk images to the guest OS, or map network drives. Mapping network drives in DOS without windows installed can be ...