Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: onthecuttingedge2005 on December 28, 2005, 10:28:52 pm

Title: Detecting Hard Words
Post by: onthecuttingedge2005 on December 28, 2005, 10:28:52 pm
Here is a technique I found that works rather well for detecting words that seems to have some difficulty in being detected.

Sometimes some specific words are hard to detect in debugging.

Code: [Select]
If DetWord = "" Then DetWord = 0
ChckSent = HalBrain.AlphaNumericalOnly(OriginalSentence)
ChckSent = Replace(ChckSent, "'RE", "", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'S", "", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'LL", "", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'D", "", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'T", "", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'R ", " ", 1, -1, vbTextCompare)
ChckSent = Replace(ChckSent, "'M", "", 1, -1, vbTextCompare)
MarkSent = ">" & ChckSent & "<"
If InStr(1, MarkSent, ">I ", 1) > 0 Then DetWord = 1
If InStr(1, MarkSent, " I<", 1) > 0 Then DetWord = 1
If InStr(1, MarkSent, " I ", 1) > 0 Then DetWord = 1
HalBrain.DebugWatch DetWord, "Detect A Word"

The variable can be passed down into code easly.

Jerry[8D]
Title: Detecting Hard Words
Post by: moreis62 on December 29, 2005, 04:22:32 am


KEEP UP THE GOOD WORK.