LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help issues with arrays

Solved!
Go to solution
 
The purpose of the project is for the user to enter some ingredients as input and the project given 10 pre-set recipes will go looking for which recipe contains the ingredients entered by the user

i've tried so many times can someone help me pls?

0 Kudos
Message 1 of 22
(1,042 Views)

Maybe you can describe in words what you have tried so far ?  or even show some code ?

0 Kudos
Message 2 of 22
(1,032 Views)
 

this is what i have done : (link deleted)

0 Kudos
Message 3 of 22
(1,008 Views)

I would like when searching for one of the words in the constant array to find the array row to which that word belongs. but as you can see, there may be some errors.

0 Kudos
Message 4 of 22
(1,005 Views)

What is the outer loop doing ?

 

So you want to select each word in the constant array or the ingredients array ?  and search for it in which array ?   

 

You need to give your arrays and constants meaningful names . . .  it helps you keep focused on what you are trying to do.

0 Kudos
Message 5 of 22
(996 Views)

@GamerBlock27 wrote:
this is what i have done : (link deleted)

Please do not host attachments on ad and popup riddled external sites. You can attach your code to the post right here!

It is not acceptable to expose forum users to deceptive redirects and a jungle of clicks just to get your attachment.

0 Kudos
Message 6 of 22
(992 Views)

sorry didnt know that

0 Kudos
Message 7 of 22
(974 Views)

Maybe you can make use of this.

0 Kudos
Message 8 of 22
(951 Views)

Do you want only the recipies that contains all ingredients, or all that contains any of them?

Either way your comparison is wrong, put probes and run in highlight mode so see what's actually being produced.

Right now you're comparing with the 1st row of your constant every time.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 22
(936 Views)
Solution
Accepted by topic author GamerBlock27

See if this can give you some ideas..... (note: Inputs are limited to single line for obvious reasons. You might want to do things case insensitive and ignore whitespace, etc.)

 

altenbach_0-1681923575059.png

 

Message 10 of 22
(912 Views)