07-12-2024, 05:26 PM
(This post was last modified: 07-12-2024, 05:27 PM by Kernelpanic.)
While reading the wiki I came across Offset(function): https://qb64phoenix.com/qb64wiki/index.p...(function)
The sub "memcpy" is apparently a fixed procedure, because when I changed the name there was an error during compilation.
What is this "memcpy"? Hard-wired? I couldn't find anything about it in the wiki.
The sub "memcpy" is apparently a fixed procedure, because when I changed the name there was an error during compilation.
What is this "memcpy"? Hard-wired? I couldn't find anything about it in the wiki.
Code: (Select All)
Option _Explicit
Declare CustomType Library
Sub zeichenKopieren (ByVal Ziel As _Offset, Byval Quelle As _Offset, Byval Bytes As Long)
End Declare
Dim As String zahlen, buchstaben
zahlen = "1234567890"
buchstaben = "ABCDEFGHIJ"
zeichenKopieren _Offset(zahlen) + 5, _Offset(buchstaben) + 5, 5
Print zahlen
End
Quote:internal\c\c_compiler\bin\c++.exe -Wl,--stack,26777216 -std=gnu++17 -fno-strict-aliasing -Wno-conversion-null -DGLEW_STATIC -DFREEGLUT_STATIC -Iinternal\c\libqb/include -Iinternal\c/parts/core/freeglut/include -Iinternal\c/parts/core/glew/include -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_NO_ICON -DDEPENDENCY_NO_SCREENIMAGE internal\c/qbx.cpp -c -o internal\c/qbx.oThat is OK.
In file included from internal\c/qbx.cpp:1894:
internal\c/../temp/maindata.txt: In function 'void QBMAIN(void*)':
internal\c/../temp/maindata.txt:1:55: error: 'zeichenKopieren' was not declared in this scope
1 | SUB_ZEICHENKOPIEREN=(CUSTOMCALL_SUB_ZEICHENKOPIEREN*)&zeichenKopieren;
| ^~~~~~~~~~~~~~~
mingw32-make: *** [Makefile:402: internal\c/qbx.o] Error 1
Code: (Select All)
'12. Juli 2024
Option _Explicit
Declare CustomType Library
Sub memcpy (ByVal Ziel As _Offset, Byval Quelle As _Offset, Byval Bytes As Long)
End Declare
Dim As String zahlen, buchstaben
zahlen = "1234567890"
buchstaben = "ABCDEFGHIJ"
memcpy _Offset(zahlen) + 5, _Offset(buchstaben) + 5, 5
Print zahlen
End