Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If the word in the previous step matches the word in the current step
#4
This is a more generic way to avoid all duplicated word(s).
Like in this scenario:
Apple
Apple
Mango
Apple
Orange
Apple
Durian
Apple
Pear

Function macro22
Code:
Copy      Help
out
str cell_word; int i nRows
ExcelSheet es.Init; nRows=es.NumRows
str prev_word
ARRAY(str) nodupe
for i 2 nRows+1
,es.GetCell(cell_word 2 i)
,if(sub.isExist(nodupe cell_word)) continue
,nodupe[] = cell_word
,web F"https://www.google.com/search?&q={cell_word}"(`)
,
#sub isExist
function# ARRAY(str)&arr $b
int i
;out F"arr.len = {arr.len}, b = {b}"
out F"{b}"
for i 0 arr.len
,if (arr[i] = b)
,,ret 1
ret 0


Messages In This Thread
RE: If the word in the previous step matches the word in the current step - by Start_Learning - 04-15-2019, 03:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)