Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use QM to express conditio statements
#1
Hello everyone,

I am a beginner, I want to know how to use QM, express the following statement, thanks in advance.

1.
bool recurse = true;
bool success;

success = zip.AppendFiles("c:/temp/*",recurse);
if (success != true) {
    //do something
    return;
}

2.
if (var1 Starts with "somestring") {
    //do something
}

if (var2 Does not start with "somestring") {
    //do something
}

3.
if (var1 Ends with "somestring") {
    //do something
}

if (var2 Does not Ends with "somestring") {
    //do something
}

4.
if (var1 Is Empty) {
    //do something
}

if (var2 Is Not Empty) {
    //do something
}
#2
I Not sure, the first answer is correct?  


Macro Macro9
Code:
Copy      Help
out

;ture
int recurse = 1
int success
success = zip.AppendFiles("c:/temp/*",recurse)
if (success != 1) 
,;do something

;Starts with
str s1 = "somestring word"
if(s1.beg("somestring")) out "True"; else out "False"

;Ends with
str s2 = "word somestring"
if(s2.end("somestring")) out "True"; else out "False"

;Empty
str s3 = ""
if(empty(s3)) out "True"; else out "False"

;contain
str s4 = "word somestring word"
int i = find(s4 "somestring")
if(i!=-1) out "True"; else out "False"


Forum Jump:


Users browsing this thread: 1 Guest(s)