Hi Jerry,
sorry about mucking up the works by using the word jump.
But please allow me to explain:
from what I understand, a function is used to carry a piece of data, like the input string of the user to a new location.
That function requires a dim to retain that data, and from what I understand the dim statement is only required once.
The dim statement, is actually separate from the function statement, but the function statement uses the dim statement to temporarily store the data that is going to be transferred.
From what I understand a function statement is similar to a sub statement but a sub statement does not transfer data.
Also I'm referring to the dim statement, you would have to have a different dim string statement for each function that you are using.
I think it would look something like this:
Rem PLUGIN: PRE-PROCESS
Dim EmotQuery() <=== this dim would be used for your, "HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotions" & " WHERE Sentence = 'anger' LIMIT 1", EmotQuery"
Dim banana() <=== We must declare an empty array to store query results in
Dim vrbanana, vrstrawberries, vrapples <=== these are strings that you will be using with the dim banana()
getbanana = "are bananas yellow" <=== by making getbanana equal a string you activate the function call.
vrbanana = lookingforbanana(getbanana)<==>vrbanana transfers that data to a sub function and "jumps" there to complete the process. <=>|
|
|
Rem PLUGIN: FUNCTIONS |
|
Function lookingforbanana(getbanana) <=== this is the point where the data it has been transferred to <=======================|
If getbanana = "are bananas yellow" Then lookingforbanana = "yes bananas are yellow" |
End Function >===> returns the data in the lookingforbanana string and continue process. >===>---------------------------------------------->|
This is about all I understand about dims and its function, with arrays and function calls.
It seems that you are using the dim statement in a different manner one in which I don't fully understand yet but I'm sure I will ones your emotions plug-in is completed.
Sincerely, sorry about using the word jump but I've only been trying to learn how to program for about two months.
C load.