# How to flag this point?

## Recommended Posts

Posted (edited)

I have been twirling my fork around for a few hours and have finally reached a fairly solid point in my script. One thing which is not coming to me though, is ideas on how to flag a specific point. I have attempted doing it a few ways with no avail.

I won't be posting my code unless it's REALLY required (It will be extremely difficult to understand + it's for work). I think the following will be able to get the idea across easily.

What my code does:
- Go as deep as you can (\$depth ;Goes from 1 -> 5).
- Increase the value of \$X[\$depth] as much as you can (\$X[\$depth] ;Can be a number 0 -> 5).
- When the value of \$X[\$depth] = 5, decrease the depth by 1.
- When the sum of all \$X[\$depth] elements = 10, shuffle 1 to the highest point (left-most numbers = depths):

- When \$depth = 1, decrement \$X[\$depth] and jump back up to the first non-0 AND do not increment it, causing it to do:

^ Is what I don't have working. I currently go back to depth 5, see a 5, jump out to depth 4, see a 4, then increment it to 5 (don't want this to happen) before decrementing it by 1. I want to go back to depth 4 and decrement it, then do the +1/-1 shuffle while jumping out to higher depths.

Edited by IAMK

##### Share on other sites

Posting some code?

Best Regards.

Spoiler

Thoughts:

• I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

##### Share on other sites
5 minutes ago, FrancescoDiMuro said:

Posting some code?

Best Regards.

@IAMK to give people a better understanding, you might try writing the function in pseudo-code if you don't have that piece coded entirely:

```for \$depth = 1 To -5
;do this
;then this
next```

√-1 2^3 ∑ π, and it was delicious!

##### Share on other sites
2 minutes ago, JLogan3o13 said:

@IAMK to give people a better understanding, you might try writing the function in pseudo-code if you don't have that piece coded entirely:

That is what I was asking

Spoiler

Thoughts:

• I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

##### Share on other sites
Posted (edited)

I don't know what's wrong, but I can't type anything in the previous post, sorry.

Edited by Pured
Posts merged

##### Share on other sites

FYI: I have scrapped this extremely complex method and started from scratch with a much simpler design (one anyone can read and understand - New thread).

## Create an account

Register a new account