i can't get any step forward
why can't tell anyone?
Simplest things as thinBasic_DeclareFunction
What does it do ?
Will it declare some API-function call from module to be present in thinBasic?
Or will it declare a module function as i have in PB
function EnsureFolderExists alias "EnsureFolderExists" (byval sDir as string, optional byref sSubDir as string, optional byref HideError as long) Export as string
and i try to make it accessible - without any parsing - within LoadLocalSymbols
thinbasic_DeclareFunction("EnsureFolderExists (byval sDir as string, optional byref sSubDir as string, optional byref HideError as long) as string", codeptr(EnsureFolderExists))
or do i have to use another way? (i do i think because it does not work)
how can i create a local variable to the current scriptfunction upon a hash-ptr when i do not want to exploit the hash-table itself to keep the other content private?
how to return results from pb when there is no way to predefine a result-type as here:
p_Props = thinBasic_Class_Add("cProperty", Codeptr(tbProps_Exec))
do i have to force it by naming it to tbProps_Exec$ ?
Ain't there any resultbuffer that i can use to put the result onto, place the datatype next to it so thincore will pass the value back as defined type to the calling script-statement (-function/-subelement)
e.g. the script calls something dimensioned as
cProperty.whatever( here tbProps_Exec will parse)
i parse the dot + a string token, open parens, parameters...
string token allows me to detect what user wants - maybe defines datatype of a new property and i just want to return ok, done as
Local iResult as Integer
iResult = -1
but i can not simply write
since tbProps_Exec is not defined to return a 16-bit integer nor boolean .
If thincore had a function
thinBasic_ReturnValue(byval pData as Dword, byval lLenData as Long, byval Maintype as Word, byval SubType as Word)
or just simple
thinBasic_ReturnResult_String(byval sData as String)
thinBasic_ReturnResult_Int16(byval iData as Integer)
thinBasic_ReturnResult_Byte( byval bData as Byte)
so in case my new class-symbol
x = cproperty<.followed by unknown that i will parse>
' or
y = anyfunc( 1, 2, cproperty<.whatever>, 4)
is encountered and invokes to call on tbProps_Exec ( as class-default-function if no matching method is defined )
i can tell thincore what value and type to use to replace the token "cProperty" until the end of what i parsed
I mean it works currently already like that - i don't know if it is meant to work this way at all - except the return-value - i dont know how to
swap the token so thincore "thinks" it's a variable of a certain datatype that i could fill a value into
Bookmarks