I did mention lists and maps in the first post of this thread.
Search found 3960 matches
- Mon Jan 05, 2026 2:53 pm
- Forum: Bugs - Windows
- Topic: TypeOf() and array
- Replies: 6
- Views: 155
Re: TypeOf() and array
- Mon Jan 05, 2026 2:44 pm
- Forum: Bugs - Windows
- Topic: TypeOf() and array
- Replies: 6
- Views: 155
Re: TypeOf() and array
Of course it's an array element. And what is an array element, generally speaking? A variable.
And even if you don't consider this a bug, it should work!
So feel free to consider this a feature request if you prefer, that doesn't matter.
- Mon Jan 05, 2026 2:27 pm
- Forum: Bugs - Windows
- Topic: TypeOf() and array
- Replies: 6
- Views: 155
Re: TypeOf() and array
I think at least a(0) can be considered a variable (integer variable in the above example).infratec wrote: Mon Jan 05, 2026 12:33 pm An array is an array and not a variable. It is not listed as allowed object.
So at least
Code: Select all
ShowType(a(0))- Sun Jan 04, 2026 4:06 pm
- Forum: Bugs - Windows
- Topic: TypeOf() and array
- Replies: 6
- Views: 155
TypeOf() and array
TypeOf() cannot handle a plain array as argument.
; PB 6.30 beta 5
EnableExplicit
Macro ShowType (_x_)
CompilerSelect TypeOf(_x_)
CompilerCase #PB_Ascii
Debug "Ascii"
CompilerCase #PB_Byte
Debug "Byte"
CompilerCase #PB_Character
Debug "Character"
CompilerCase #PB_Double
Debug "Double ...
; PB 6.30 beta 5
EnableExplicit
Macro ShowType (_x_)
CompilerSelect TypeOf(_x_)
CompilerCase #PB_Ascii
Debug "Ascii"
CompilerCase #PB_Byte
Debug "Byte"
CompilerCase #PB_Character
Debug "Character"
CompilerCase #PB_Double
Debug "Double ...
- Sun Jan 04, 2026 3:37 pm
- Forum: Coding Questions
- Topic: TypeOf()
- Replies: 5
- Views: 435
Re: TypeOf()
Hi #NULL,
thanks for your reply.
I agree with you. I wrote a corresponding bug report .
At least I've now managed to get some executable code that does what I want by using a dummy variable.
Whether such code will prove useful in practice is another question. ;-)
; PB 6.30 beta 5
EnableExplicit ...
thanks for your reply.
I agree with you. I wrote a corresponding bug report .
At least I've now managed to get some executable code that does what I want by using a dummy variable.
Whether such code will prove useful in practice is another question. ;-)
; PB 6.30 beta 5
EnableExplicit ...
- Sat Jan 03, 2026 8:29 pm
- Forum: Coding Questions
- Topic: Access to global MAP into module [Resolved]
- Replies: 5
- Views: 114
Re: Access to global MAP into module [Resolved]
Accessing a global map in the main code from inside a module would contradict the purpose and intent of modules.Kwai chang caine wrote: Sat Jan 03, 2026 8:03 pm Is it possible to access to the global MAP created in the main code ?
- Thu Jan 01, 2026 2:24 pm
- Forum: Coding Questions
- Topic: TypeOf()
- Replies: 5
- Views: 435
Re: TypeOf()
My actual goal is to write procedures for arrays, lists, and maps that can process all simple data types. I thought that TypeOf() could help with this. I thought that instead of writing 11 individual procedures, something like the following could work:
Macro WriteProcedureHeader (_x ...
Macro WriteProcedureHeader (_x ...
- Thu Jan 01, 2026 1:46 pm
- Forum: Off Topic
- Topic: HAPPY NEW YEAR!!
- Replies: 20
- Views: 559
Re: HAPPY NEW YEAR!!
I wish everyone a happy new year, and peace on earth!
- Wed Dec 31, 2025 8:03 pm
- Forum: Coding Questions
- Topic: TypeOf()
- Replies: 5
- Views: 435
Re: TypeOf()
Oops, I didn't think about TypeOf() working at compile time for the moment. However, if I replace Select with CompilerSelect, Case with CompilerCase etc., then my above code doesn't work either.
Thanks for the explanation, idle!
Thanks for the explanation, idle!
- Tue Dec 30, 2025 7:13 pm
- Forum: Coding Questions
- Topic: TypeOf()
- Replies: 5
- Views: 435
TypeOf()
In the following code, both lines at the end raise an error if uncommented. Why?
; PB 6.30 beta 5 (x64) on Windows
Macro ShowType (_x_)
Select TypeOf(_x_)
Case #PB_Array
Debug "Array"
Case #PB_Integer
Debug "Integer"
Default
Debug "Other"
EndSelect
EndMacro
Dim a.i(5)
; ShowType(a ...
; PB 6.30 beta 5 (x64) on Windows
Macro ShowType (_x_)
Select TypeOf(_x_)
Case #PB_Array
Debug "Array"
Case #PB_Integer
Debug "Integer"
Default
Debug "Other"
EndSelect
EndMacro
Dim a.i(5)
; ShowType(a ...
- Fri Dec 19, 2025 4:29 pm
- Forum: Bugs - Windows
- Topic: Issue with SetGadgetState() and SetGadgetItemState() on Windows
- Replies: 16
- Views: 986
Re: Issue with SetGadgetState() and SetGadgetItemState() on Windows
I can confirm all problems reported above by bal, tested with PB 6.30 beta 5 (x64) on Windows 11.
- Wed Dec 03, 2025 10:18 pm
- Forum: Bugs - Documentation
- Topic: Broken help for CompareStructure()
- Replies: 0
- Views: 392
Broken help for CompareStructure()
I can get the documentation of CompareStructure via the index of the help that is built-in in the PureBasic IDE.
However, when I write CompareStructure in the IDE, set the caret on that word and press [F1], I get only a blank page (tested with the x64 versions of PB 6.21 and PB 6.30 beta 4 on ...
However, when I write CompareStructure in the IDE, set the caret on that word and press [F1], I get only a blank page (tested with the x64 versions of PB 6.21 and PB 6.30 beta 4 on ...
- Sun Nov 30, 2025 1:54 pm
- Forum: General Discussion
- Topic: PB Discord Link
- Replies: 12
- Views: 1373
Re: PB Discord Link
The PureBasic community is here, no?
I think splitting the community across diiferent forums would be disadvantageous.
I think splitting the community across diiferent forums would be disadvantageous.
- Tue Nov 18, 2025 2:39 pm
- Forum: Bugs - Documentation
- Topic: MemorySize()
- Replies: 0
- Views: 842
MemorySize()
This post is based on the documentation of PB 6.21 and PB 6.30 beta 4.
There is a contradiction between the help for ReceiveHTTPMemory() and the help for MemorySize() .
ReceiveHTTPMemory()
Return value
Returns the new memory buffer address if the download was successful, zero otherwise ...
There is a contradiction between the help for ReceiveHTTPMemory() and the help for MemorySize() .
ReceiveHTTPMemory()
Return value
Returns the new memory buffer address if the download was successful, zero otherwise ...
- Tue Nov 18, 2025 11:30 am
- Forum: Off Topic
- Topic: Free, Opensource…
- Replies: 19
- Views: 2918
Re: Free, Opensource…
Yep. I only can say: “Don't feed the troll.”