July 17, 200619 yr Hi all (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == & if{ 0 (>L:FMCPage,enum) 0 (>L:FMCPage_Sub,enum) }(L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == & if{ 2 (>L:FMCPage,enum) 1 (>L:FMCPage_Sub,enum) } If I click this to get page 0 0 from page 1 1 it fires the next line 0 0 and I end up at page 2 1 Is there another way? Paul EGLD
July 17, 200619 yr Hi,You can try with if(...) and else(...)Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 17, 200619 yr Paul,You might try this simple approach:(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 sp0 0 sp1 }(L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 sp0 1 sp1 }l0 (>L:FMCPage,enum) l1 (>L:FMCPage_Sub,enum) Tom
July 18, 200619 yr Author Hello Tom It does not jump across pages anymore, but the click now works on other pages not Defined in this code and all return page 0 0. Full code for this button (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == & if{ 3 sp0 0 sp1 } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == & if{ 0 sp0 0 sp1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == & if{ 2 sp0 1 sp1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == & if{ 2 sp0 1 sp1 } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == & if{ 2 sp0 1 sp1 } l0 (>L:FMCPage,enum) l1 (>L:FMCPage_Sub,enum) Paul Paul EGLD
July 18, 200619 yr Paul,Can you explain why you want everything in one ?And what are you trying to achieve?Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 18, 200619 yr Author Jan This is FMC LSK 6 button, It only changes one page at a time but from many pages. Paul Paul EGLD
July 18, 200619 yr I see,Did you try && instead of & ?Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 19, 200619 yr Author Jan Yes I tried that, If I take out all the code except the last line L:FMC_Page,enum) l1 (>L:FMC_PLN_Sub,enum) it still gives 0 0! Is Sp effective throughout the complete gauge or just the element or the line? Paul Paul EGLD
July 19, 200619 yr Paul,s0 and l0 is often tricky business.Try something like:(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == and if{ 3 s0 0 s1 } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == and if{ 0 s0 0 s1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == and if{ 2 s0 1 s1 } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == and if{ 2 s0 1 s1 } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 s0 1 s1 } s0 (>L:FMCPage,enum) s1 (>L:FMCPage_Sub,enum)or(L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 0 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 1 == (L:FMCPage_Sub,enum) 1 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 3 == (L:FMCPage_Sub,enum) 1 == and if{ 3 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 5 == (L:FMCPage_Sub,enum) 0 == and if{ 0 (>L:value 1,enum) 0 (>L:value 2,enum) } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 0 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:FMCPage,enum) 2 == (L:FMCPage_Sub,enum) 2 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:FMCPage,enum) 0 == (L:FMCPage_Sub,enum) 0 == and if{ 2 (>L:value 1,enum) 1 (>L:value 2,enum) } (L:value 1,enum) (>L:FMCPage,enum) (L:value 2,enum) (>L:FMCPage_Sub,enum)Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
July 19, 200619 yr Author Jan/Tom Both solutions worked OK to get rid of the pages skiping problem. There remains a problem with the page number still stored will show a page that you don't want if you press again. I am working on that and think I have a way. Thanks for your help. paul Paul EGLD
July 20, 200619 yr Paul,Glad to know you figured out the solution.Now, some "tutorialing" :-)> l0 (>L:FMC_Page,enum) l1 (>L:FMC_PLN_Sub,enum)> >> it still gives 0 0! And will give 0 0 forever, because within the , registers are reset to 0, so as there is no value saved in s0 and s1, l0 and l1 default to 0. >Is Sp effective throughout the complete gauge or just the element >or the line?It's a bit more complex than that. They are direct linked to the stack's current visibility. Some gauge structures share a common stack (, ) where others, like events (,etc) limit the stack to their own space.Registers are great to use in terms of code efficiency and runtime speed, but as Jan stated, may be rather confusing if you don't have a strong understanding of the different ways they can be managed inside a gauge.Tom
July 20, 200619 yr Author Tom Thanks for the lesson, I got round the problem by giving the click back to its own page number to stop the last stored number being used. ie. (L:FMC_Page,enum) 3 == (L:FMC_PLN_Sub,enum) 0 == & if{ 3 s0 0 s1 } gives a dead button. Paul Paul EGLD
Create an account or sign in to comment