perhaps one of you boffins can help me especially since I find JavaScript so difficult
Procedure MemMoveInt(*src, copyfrom, copyto, last)
EnableJS
;srcAr = p_src.Array SB V2.31
srcAr = ap_src.Array
srcAr.copyWithin( v_copyto,v_copyfrom, v_last )
DisableJS
EndProcedure
this code used to ...
Search found 27 matches
- Fri May 31, 2024 2:20 pm
- Forum: Coding Questions
- Topic: Code which worked in 2.3 but not in 2.5
- Replies: 0
- Views: 11403
- Sat May 25, 2024 12:49 pm
- Forum: Coding Questions
- Topic: Pointer issue [solved]
- Replies: 1
- Views: 3070
Pointer issue [solved]
I am mostly a PB user and I use Spiderbasic due to its similarity
but this code doesn't work on Spiderbasic even though it runs
Procedure Test(*var.integer)
*var\i = 7
EndProcedure
a.i = 5
Test(@a)
debug a
On PB the result is 7 while on SpiderBasic it is 5.
can someone explain please ...
but this code doesn't work on Spiderbasic even though it runs
Procedure Test(*var.integer)
*var\i = 7
EndProcedure
a.i = 5
Test(@a)
debug a
On PB the result is 7 while on SpiderBasic it is 5.
can someone explain please ...
- Sat May 25, 2024 12:42 pm
- Forum: Coding Questions
- Topic: How does one get IP and hostname?
- Replies: 5
- Views: 4496
Re: How does one get IP and hostname?
thanks @Fred and sorry for late reply
I have used this for public IP
;Example code to get the user's public IP address using an external API
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
if UserData = 1
if ParseJSON(0,Result$)
ObjectValue = JSONValue(0)
NewMap Options ...
I have used this for public IP
;Example code to get the user's public IP address using an external API
Procedure HttpGetEvent(Success, Result$, UserData)
If Success
if UserData = 1
if ParseJSON(0,Result$)
ObjectValue = JSONValue(0)
NewMap Options ...
- Tue May 14, 2024 1:03 pm
- Forum: Coding Questions
- Topic: How does one get IP and hostname?
- Replies: 5
- Views: 4496
Re: How does one get IP and hostname?
that's a bummer, that is
- Mon May 13, 2024 2:00 pm
- Forum: Coding Questions
- Topic: How does one get IP and hostname?
- Replies: 5
- Views: 4496
How does one get IP and hostname?
This sounds like an easy question, but haven't really managed it
how do I get the PC/device name and IP address with spiderbasic?
how do I get the PC/device name and IP address with spiderbasic?
- Tue Apr 30, 2024 3:00 pm
- Forum: Coding Questions
- Topic: Client server models
- Replies: 2
- Views: 4078
Client server models
Though one of my best friends had explained to me the client/server model it took me years for me to actually digest and finally understand it.
And lately I managed to do my first client/server app using PB/CGI.
Q1
But are there other "cleaner" ways than using CGI? Are there examples? Or ...
And lately I managed to do my first client/server app using PB/CGI.
Q1
But are there other "cleaner" ways than using CGI? Are there examples? Or ...
- Tue Apr 30, 2024 6:49 am
- Forum: Coding Questions
- Topic: How to make and use a pointer to a function?[fixed]
- Replies: 4
- Views: 4324
Re: How to make and use a pointer to a function?
that works! thank you
- Mon Apr 29, 2024 4:22 pm
- Forum: Coding Questions
- Topic: How to make and use a pointer to a function?[fixed]
- Replies: 4
- Views: 4324
Re: How to make and use a pointer to a function?
I did
I need a way to call the functions
I need a way to call the functions
Code: Select all
Declare.i Test()
Procedure Test()
debug "Hello World!"
EndProcedure
define *ptr
*ptr = @Test()
;How do I call the function?
*ptr()
- Mon Apr 29, 2024 2:47 pm
- Forum: Coding Questions
- Topic: How to make and use a pointer to a function?[fixed]
- Replies: 4
- Views: 4324
How to make and use a pointer to a function?[fixed]
I am a sucker for pointers, especially pointers to functions and SB already uses them internally.
But how can I use them myself?
Added an example for those like me
Procedure.s ToUpper(s$)
ProcedureReturn UCase(s$)
EndProcedure
Procedure.s ToLower(s$)
ProcedureReturn LCase(s$)
EndProcedure ...
But how can I use them myself?
Added an example for those like me
Procedure.s ToUpper(s$)
ProcedureReturn UCase(s$)
EndProcedure
Procedure.s ToLower(s$)
ProcedureReturn LCase(s$)
EndProcedure ...
- Fri May 22, 2020 1:55 am
- Forum: Coding Questions
- Topic: compiler Include does not see globals
- Replies: 4
- Views: 4348
Re: compiler Include does not see globals
In PureBasic it works fine; is this a difference between the 2 compilers?
But what about modules?
main.sb
XIncludeFile "./inc.sbi"
DeclareModule test
Declare myfun()
EndDeclareModule
Module test
UseModule test
Procedure myfun()
test2::myFormat() <--- this should be seen...but I get ...
But what about modules?
main.sb
XIncludeFile "./inc.sbi"
DeclareModule test
Declare myfun()
EndDeclareModule
Module test
UseModule test
Procedure myfun()
test2::myFormat() <--- this should be seen...but I get ...