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

Pages: 1 2 [3]
31
QB64 Discussion / adding/subtracting times
« on: July 26, 2020, 03:53:07 pm »
Hi

Someone out there must have come across this before.

I need to subtract one time from another, to work out an elspased time.

The times are stored in the format hh:mm:ss.dd so are always the same length (time of day stored to 2 decimal places)

Anyone got some code which can do this?

I'll need to have the result stored in (a) the same format (i.e. to 2 decimal places) and also (b) as a number of seconds rounded up to the next full second (anything after the deimal point rounds up, not just to the nearest second), but I can probably figure that out once I've got the subtraction worked out.

It will save me having to write some convoluted code (as I'm not exactly smart with this stuff)

Many thanks for your time.

John

32
QB64 Discussion / Re: Printing to Zebra thermal printers
« on: July 26, 2020, 03:41:50 pm »
Hi

Thanks - will have a close look at that code to see how it works. I will be connecting via usb in all probability but networking could be a secondary option I suppose.

Would this also enable escape codes to be used on other printers too?

I have had to make changes to an old QB4.5 program ported to QB64, which output via LPT to parallel printers by making them print out to rtf documents instead of directly to the printers as previously, because I couldnt use the escape codes directly in QB64 according to the Lprint information.

Grateful for your responses.

John

33
QB64 Discussion / Re: solution question
« on: July 19, 2020, 11:59:34 am »
Hi.

I started my programming life on a Sinclair ZX81 many years ago, and learnt the basics by laboriously typing up long program listings from magazines, finding things that worked for me and then getting some books and progress through a Spectrum, then Basic on an Amstrad PCW and finally through to pcs via QuickBasic 4.5 and now QB64, modifying my program requirements to suit my needs over the years.

In the early days, it was all game-based, but now more utilitarian.

My philosophy has always been to try to get a core set of subroutines which do specific jobs and then build around those. I suppose I'm fortunate that I have a specific requirement in my world, so I can devote time to that (timing running races and writing software to handle the data and timings) and that's what I've been developing since I started out in 1987.

As a result I only ever need a fairly minimal understanding, which is good for me as QB64 has developed into a mindblowing array (excuse the pun) of keywords, most of which I don't understand or will probably never use.

I know that I have not developed the best programming practices over the years and have probably got sloppy code and bad habits, but what I have does the job I need, so that's always been my work method - have a specific goal, understand what I need to do and work out how to do it (then tidy it up!).

Porting my program from QB4/5 to QB64 took a day or two - the hardest part was getting my head round how the printing side of things now doesn't work with the methods I've used for 20 years!

There are many people on this forum who will be happy to help you out if you get stuck, but the knowledge base here and any books you can get your hands on (even if not specific to this version of Basic) will be helpful to you as a lot of things can be transferred from one variety to another with only relatively small changes.

It tends to be the graphical side of things which is more complex (in my view) so my programs tend to be keypress-based rather than mouse orientated.

Best of luck - you'll have hours of fun and frustration, in equal measure!!

John

34
QB64 Discussion / Printing to Zebra thermal printers
« on: July 19, 2020, 11:44:20 am »
Hi.

Anyone had any success printing to Zebra or similar thermal printers from QB64?

I know you can't use printer control codes as in the "olden days of escape characters", but I just want to print some plain text and don't want to spend the best part of £300 on a printer only to find I can't do it!

It's just to do quick printouts for people at race events, to confirm finish times and positions etc, so no fancy graphics required.

Thanks for any tips.

John

35
QB64 Discussion / Re: Long Hex number to decimal
« on: April 06, 2020, 01:22:59 pm »
Hi

Thanks - works fine as long I use the && long integers to get all the decimal digits I need. :-)

36
QB64 Discussion / Re: Long Hex number to decimal
« on: April 06, 2020, 09:50:43 am »
ok thanks - knew there would be a simple way to do it!

37
QB64 Discussion / Re: QBooks for QB64
« on: April 06, 2020, 09:41:48 am »
I'm not a religious man, but hands down, this 940 page "Bible" is hard to beat:
https://www.amazon.com/gp/product/1556152620
Hi

I have a slightly earlier Microsoft book - "Microsoft QuickBasic Compiler for DOS Systems 4.5" (1988 reprinted in 1991) which also came with 2 3.5" floppy disks!!

That one stays under the shelves as I find the Que book easier to work with - just used to come out when I needed some reference material.

38
QB64 Discussion / Long Hex number to decimal
« on: April 06, 2020, 09:31:34 am »
Just starting a small project simply to keep my brain ticking over during lockdown.

To save me reinventing the wheel, does anyone have some code for converting a long hex number (mainly 7 hex digits but optional at 12 digits as well) from hex to decimal?

Also the reverse may prove useful at some point.

I can provide some sample codes to save you making them up if that would help.

Thanks

39
QB64 Discussion / Re: QBooks for QB64
« on: April 06, 2020, 09:28:47 am »
Also found in my "pile under the shelves" is "QBasic - the language of MS-DOS" by Mike James (1992) I/O Press.

Anyone want this?

Not a big book (<250 pages) so shouldn't cost too much for postage in the UK. Not sure about sending overseas though.

40
QB64 Discussion / Re: QBooks for QB64
« on: April 01, 2020, 12:21:49 pm »
I still use "Using QBasic" by Feldman & Rugg (Que publication) from 1991

Pages: 1 2 [3]