Search found 90 matches

by bosker
Fri May 03, 2019 12:55 pm
Forum: Coding Questions
Topic: Best way to put this country list into my program?
Replies: 23
Views: 4129

Re: Best way to put this country list into my program?

You said you wanted the names embedded in the program and I would do that (as others suggest) by putting the data into the DataSection. The minimum storage solution is to use the data directly from the DataSection. How easy access will be depends on how you need to use the data. Here's an example of...
by bosker
Sat Oct 20, 2018 10:19 am
Forum: General Discussion
Topic: 32bit is no longer the important build of PB?
Replies: 17
Views: 3729

Re: 32bit is no longer the important build of PB?

But you can still make 32-bit applications using the latest PellesC compiler.
by bosker
Mon May 21, 2018 10:41 am
Forum: Coding Questions
Topic: How to trap keystrokes in ListIcon gadget?
Replies: 4
Views: 870

Re: How to trap keystrokes in ListIcon gadget?

@RobertSF
Are you using the demo version of PB?
by bosker
Mon Nov 20, 2017 3:35 pm
Forum: Coding Questions
Topic: Post event and canvas
Replies: 7
Views: 1828

Re: Post event and canvas

In your ParentCallback function, should the line...

Code: Select all

Debug GetGadgetAttribute(Gadget, #PB_Canvas_MouseX)
..actually be...

Code: Select all

Debug GetGadgetAttribute(\Gadget, #PB_Canvas_MouseX)
The memory failure goes away with this change.
by bosker
Sun Oct 22, 2017 2:59 pm
Forum: Coding Questions
Topic: PB 5.45 Data.u in ASCII mode
Replies: 13
Views: 3375

Re: PB 5.45 Data.u in ASCII mode

@Little John Thanks for the response... I admit I thought the data.u / data.a WAS the way to get Unicode / Ascii strings in the opposite kind of exe. The data.i @"string" was specifically added some years ago (by Timo I think) but has never showed up in the docs. I agree with your caution ...
by bosker
Sat Oct 21, 2017 12:37 am
Forum: Coding Questions
Topic: PB 5.45 Data.u in ASCII mode
Replies: 13
Views: 3375

Re: PB 5.45 Data.u in ASCII mode

Hi Skywalk The project is (probably) quite unusual... A brief synopsis... I have a bunch of programs that manipulate streams of (ASCII) data. The actual nitty-gritty manipulation is done by a collection of (16?) proprietary DLL's. I only have the interfaces to the customer DLL's and they all use ASC...
by bosker
Fri Oct 20, 2017 9:32 pm
Forum: Coding Questions
Topic: PB 5.45 Data.u in ASCII mode
Replies: 13
Views: 3375

Re: PB 5.45 Data.u in ASCII mode

Well, I have some sympathy for fryquez because it's quite likely that you may need ASCII strings in a Unicode program or Unicode strings in an ASCII program. I certainly do. Using... Data.u "string" Data.a "string" .. is the only way of getting those. I've been using data.a "...
by bosker
Fri Mar 24, 2017 12:41 am
Forum: Feature Requests and Wishlists
Topic: Ascii-Strings in Data
Replies: 22
Views: 7353

Re: Ascii-Strings in Data

Well, I didn't know PB would create strings in Data with .a and .c. So I learned something new today. I don't suppose this is documented anywhere. (Or is it?) Incidentally, the IMA occurs because *scan is pointing at the string data for "Ascii 1". Using *scan\i[0] interprets the string cha...
by bosker
Thu Mar 23, 2017 5:03 pm
Forum: Feature Requests and Wishlists
Topic: Ascii-Strings in Data
Replies: 22
Views: 7353

Re: Ascii-Strings in Data

I'm really having a bad day. The byte retrieval fails because the version I posted declares i and j as Long. My source (naturally) already has i and j untyped (integer). That should be Integer or defaulted. I owe you several gallons of e-beer to make up for the cr?p. To make sure we have the same so...
by bosker
Thu Mar 23, 2017 4:23 pm
Forum: Feature Requests and Wishlists
Topic: Ascii-Strings in Data
Replies: 22
Views: 7353

Re: Ascii-Strings in Data

Ok - stupid, stupid.

The assembler macro has the line

Code: Select all

    dd label
For 64 bit this should (of course) be

Code: Select all

    dq label
Because addresses are quads. With that change it works for 64 bit.
I'll go fall on my coding pencil.
by bosker
Thu Mar 23, 2017 4:10 pm
Forum: Feature Requests and Wishlists
Topic: Ascii-Strings in Data
Replies: 22
Views: 7353

Re: Ascii-Strings in Data

Dammit!
There should be a comment line at the top that says.. ; NOTE: 32 bit only
It's in my source file but I guess I chopped it off pasting. I haven't tried 64-bit.

My sincere apologies for that.

I'll try 64-bit and see what's up.
by bosker
Thu Mar 23, 2017 11:12 am
Forum: Feature Requests and Wishlists
Topic: Ascii-Strings in Data
Replies: 22
Views: 7353

Re: Ascii-Strings in Data

@GPI - you can declare Ascii strings regardless of PB compiler mode if you are prepared to use assembler. My example below shows the use of an assembler macro which creates an Ascii string table in the DataSection. The asm macro creates a table of string addresses followed by the string data (simila...
by bosker
Tue Feb 21, 2017 7:02 pm
Forum: Coding Questions
Topic: Can I check and / or compile a code in memory? ...
Replies: 12
Views: 2171

Re: Can I check and / or compile a code in memory? ...

I'm guessing that you want to be able to send the compiler (in /STANDBY mode) the text of your program in a block of memory.
(and perhaps get results back in memory). Is that correct?

Unfortunately, I admit I don't know of any way to do that.
by bosker
Tue Dec 27, 2016 8:18 pm
Forum: Coding Questions
Topic: [Bug?] ElapsedMilliseconds() jumps to the past ...
Replies: 11
Views: 2850

Re: Strange: ElapsedMilliseconds() jumps to the past ...

Well, my 5.50 help file certainly does specify return type.

ElapsedMilliseconds()

Syntax

Result.q = ElapsedMilliseconds()
Description

Returns the number of milliseconds that have elapsed since a specific time in the past.