As mk-soft pointed out, the docs already state that you will get a pointer to the return string.
Search found 1177 matches
- Sun Feb 25, 2024 6:21 am
- Forum: Bugs - Documentation
- Topic: Add an Example of Returning A String from a DLL
- Replies: 5
- Views: 362
- Tue Feb 20, 2024 5:30 pm
- Forum: Announcement
- Topic: Old School Text Advenure System
- Replies: 15
- Views: 1109
Re: Old School Text Advenure System
PureVision The GUI of this text adventure tool seems very basic (some buttons and text fields). What purpose does this PureVision library serve here? (I'm just trying to understand, because I can not test as I do not have access to this library) Just REM this line out as the source code doesn't use...
- Sun Dec 24, 2023 7:19 pm
- Forum: Coding Questions
- Topic: Prefilling a List
- Replies: 15
- Views: 1360
Re: Prefilling a List
Maybe something like this?
Code: Select all
set.s="[1,2,3,4,5,8,9,11,15,17,19,45,65,78]"
NewList myset()
ParseJSON(0, set)
ExtractJSONList(JSONValue(0), myset())
ForEach myset()
Debug myset()
Next
- Sun Nov 05, 2023 3:45 am
- Forum: Coding Questions
- Topic: [Solved]Access a linked list from different include file
- Replies: 17
- Views: 1159
Re: Access a linked list from different include file
. . . And use NewList to declare linked lists . . . Declare NewList LinkedList() XIncludeFile "TwoScreenList_Constants.pb" XIncludeFile "TwoScreenList_Windows.pb" XIncludeFile "PlyrAcct.pb" He's not actually creating a linked list, LinkedList() is the name of one of hi...
- Sat Nov 04, 2023 4:23 am
- Forum: Coding Questions
- Topic: [Solved]Access a linked list from different include file
- Replies: 17
- Views: 1159
Re: Access a linked list from different include file
You need to put declares in the right order in your Main file...
Code: Select all
Declare LinkedList()
XIncludeFile "TwoScreenList_Constants.pb"
XIncludeFile "TwoScreenList_Windows.pb"
XIncludeFile "PlyrAcct.pb"
- Wed Nov 01, 2023 9:51 pm
- Forum: Tricks 'n' Tips
- Topic: spinblur clock
- Replies: 13
- Views: 964
- Wed Aug 30, 2023 6:06 am
- Forum: Coding Questions
- Topic: Fetching JSON value
- Replies: 5
- Views: 786
Re: Fetching JSON value
Assuming you saved your JSON data in a file called "dat.txt" Structure usagedata prompt_tokens.i completion_tokens.i total_tokens.i EndStructure Structure messagedata role.s content.s EndStructure Structure choicesdata message.messagedata finish_reason.s index.i EndStructure Structure json...
- Thu Aug 10, 2023 7:58 pm
- Forum: Coding Questions
- Topic: UnNamed Enumerator Issue
- Replies: 24
- Views: 1130
Re: UnNamed Enumerator Issue
PureVision Generates the first two Enumerations with "Enumeration 1", third one with just "Enumeration". So it's a PureVision issue, and not PureBasic? PureVision is not an official part of PureBasic. It's a third-party tool. Actually PureVision genarates code that works just fi...
- Wed Jul 19, 2023 10:35 pm
- Forum: Off Topic
- Topic: How to store a single value into a MySQL database?
- Replies: 7
- Views: 877
Re: How to store a single value into a MySQL database?
UseSQLiteDatabase() If CreateFile(0,GetCurrentDirectory()+"mydata.sqlite") CloseFile(0) EndIf db=OpenDatabase(#PB_Any,GetCurrentDirectory()+"mydata.sqlite", "", "",#PB_Database_SQLite) If db DatabaseUpdate(db,"CREATE TABLE settings(timestamp varchar(10))...
- Tue Jun 13, 2023 10:50 pm
- Forum: Coding Questions
- Topic: Load saved file into ListIconGadget
- Replies: 21
- Views: 1110
Re: Load saved file into ListIconGadget
No. For me, the most logical thing is to change lines 145 and 427 to: TmpEdit = TextGadget(#PB_Any, 5, 65, 250, 20, "Enter dosage strength (mg)") No additional cost and almost repeats the heading of the table column. I agree but his text files already contain 'mg' so you have no choice bu...
- Tue Jun 13, 2023 9:54 pm
- Forum: Coding Questions
- Topic: Load saved file into ListIconGadget
- Replies: 21
- Views: 1110
Re: Load saved file into ListIconGadget
I don't understand these actions with "mg" (line 327). Delete to add again ? :shock: Because he wants the output to show 'mg', so if you enter 100 it displays as 100mg. But if 100mg is entered you don't want the output to display 100mgmg, so the code just makes sure 'mg' doesn't already e...
- Tue Jun 13, 2023 5:36 am
- Forum: Coding Questions
- Topic: ListIconGadget, Can't get item to update to user edited input
- Replies: 4
- Views: 375
Re: ListIconGadget, Can't get item to update to user edited input
Maybe change your EditItem procedure a little bit, you seem to be overly complicating things :wink: ... EnableExplicit ; enumerated constants Enumeration Window #Window_Main #Window_EnterInfo #Window_EnterInfoEdit #Window_Help EndEnumeration Enumeration File #File #FileName #File_1 EndEnumeration En...
- Mon Jun 12, 2023 5:31 am
- Forum: Coding Questions
- Topic: ListIconGadget, Can't get item to update to user edited input
- Replies: 4
- Views: 375
Re: ListIconGadget, Can't get item to update to user edited input
Your event loop should look something like this if you want everything in one loop... EnableExplicit ; enumerated constants Enumeration Window #Window_Main #Window_EnterInfo #Window_EnterInfoEdit #Window_Help EndEnumeration Enumeration File #File #FileName #File_1 EndEnumeration Enumeration gadget #...
- Thu Jun 08, 2023 9:58 pm
- Forum: Coding Questions
- Topic: Moving ListView Gadget Items
- Replies: 5
- Views: 282
Re: Moving ListView Gadget Items
Better use Fips code as RASHAD doesn't check for problems if you try and move first item up or last item down.
- Thu Jun 08, 2023 4:03 pm
- Forum: Feature Requests and Wishlists
- Topic: EnableExplicit should require type declaration
- Replies: 6
- Views: 609
Re: EnableExplicit should require type declaration
Exact same code, but a relative newcomer like me may not understand integer is being used. Worse, integer is 8 bytes on 64-bit machines, and 4 bytes on 32-bit machines. So this second example will fail after 2038 https://en.wikipedia.org/wiki/Year_2038_problem , but only on 32 bit machines, the 64 ...