Search found 3119 matches

by BarryG
Thu Mar 28, 2024 12:19 am
Forum: Coding Questions
Topic: What is the maximum length a string variable can hold?
Replies: 14
Views: 257

Re: What is the maximum length a string variable can hold?

NicTheQuick wrote: Wed Mar 27, 2024 5:54 pmSo what's the problem? Space() or Len()?
Maybe try with LSet() and see? @Charvista, try this. If it works, then I guess Space() is the problem?

Code: Select all

p.s=LSet("",18306000000," ")
Debug Len(p.s)
by BarryG
Thu Mar 28, 2024 12:13 am
Forum: Feature Requests and Wishlists
Topic: DebugOutput window / Script line
Replies: 5
Views: 122

Re: DebugOutput window / Script line

@Demivec: When I run your code, my line numbers are offset by -2 compared to yours (below is the output). I copied your code exactly and the first line in the IDE is the ";Use macro DebugL..." comment. Did you have 2 empty lines in your IDE before your code? 7: Before Loop 9: 1 9: 2 9: 3 9...
by BarryG
Tue Mar 26, 2024 5:12 am
Forum: Tricks 'n' Tips
Topic: Determine whether to use dark or light font/drawing...
Replies: 1
Views: 117

Re: Determine whether to use dark or light font/drawing...

Thanks for sharing. :)

You inspired me to share my ListIcon gridlines color-matching tip -> https://www.purebasic.fr/english/viewtopic.php?t=83901
by BarryG
Tue Mar 26, 2024 5:11 am
Forum: Tricks 'n' Tips
Topic: ListIconGadget color-matching grid lines
Replies: 2
Views: 199

ListIconGadget color-matching grid lines

When I use gridlines with a colored ListIconGadget, the lines look horrible unless you color them to match. Here's how I do it: Procedure SetBackColorAndLines(gad,color) r=Red(color)-20 : If r<0 : r=0 : EndIf g=Green(color)-20 : If g<0 : g=0 : EndIf b=Blue(color)-20 : If b<0 : b=0 : EndIf SetGadgetC...
by BarryG
Mon Mar 25, 2024 1:00 pm
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: [Solved] Global Chr() problem

I used a MessageRequester too, and I tested with Len() for it. Null and 0 were the results. :)
by BarryG
Sun Mar 24, 2024 1:47 am
Forum: Off Topic
Topic: PureBasic icon
Replies: 10
Views: 476

Re: PureBasic icon

Dreamland Fantasy wrote: Sat Mar 23, 2024 12:33 amI was sure that it had been discussed before
Yep, I linked it for those who may not have seen it. :)
by BarryG
Sat Mar 23, 2024 10:08 am
Forum: Bugs - Windows
Topic: Demo PB doesn't compile code that full version can
Replies: 5
Views: 494

Re: Demo PB doesn't compile code that full version can

Actually, I stand corrected: API commands are included in the demo now. :shock: Wonder when that got changed.

Image
by BarryG
Sat Mar 23, 2024 3:57 am
Forum: Bugs - Windows
Topic: Demo PB doesn't compile code that full version can
Replies: 5
Views: 494

Re: Demo PB doesn't compile code that full version can

The demo has restrictions, one of which is that you can't use direct API commands that end in an underscore. In your code snippet, this means commands like "GetDC_()" and "GetTextExtentPoint32_()", etc. You need to buy the full version to get access to those.
by BarryG
Sat Mar 23, 2024 12:20 am
Forum: Off Topic
Topic: PureBasic icon
Replies: 10
Views: 476

Re: PureBasic icon

Old thread about the PureBasic logo -> https://www.purebasic.fr/english/viewto ... 97#p437997
by BarryG
Sat Mar 23, 2024 12:13 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

The Global is outside of any conditional statements. The folding lines drawn are a bug that I've never reported. :)

Anyway, marking this as Solved because I think there must be a thread calling the variable before the Global line for it was reached.
by BarryG
Fri Mar 22, 2024 1:00 pm
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

Okay, I've "un-solved" the topic for any other suggestions. I'm thinking now maybe a thread was trying to use it before it was declared.
by BarryG
Fri Mar 22, 2024 10:44 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

It shows that "extdot$" is empty, despite me never clearing it or touching it after creation. No string operations are done on it at all after Global. I notice that if I move the Global declaration back up in my source before any CreateThread() commands, it works! So it's maybe a compile-t...
by BarryG
Fri Mar 22, 2024 10:35 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

Yes, I know it does. I said that in the first post ("All good, right?"). "Right" was rhetorical. I'll edit the post to avoid confusion, since two of you have now replied confirming that it works. That's not what I was asking. :?
by BarryG
Fri Mar 22, 2024 10:19 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

In first case, are you sure that the value of the global variable doesn't change between the time it's declared and the time it's used in the procedure? It doesn't change. Currently, the global variable "extdot$" is only declared once, literally just before two procedures that call it. Th...
by BarryG
Fri Mar 22, 2024 8:38 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 720

Re: Global Chr() problem

@pjay: The ShowMemoryViewer() command resulted in this: The specified memory location is not valid for reading. Hmm. I also noticed it fails with simple Chr() too, like Chr(35) for "#", so it's not a Unicode issue. @Infratec, yes, that's why I said it's all good in that snippet. The screen...