| |

VerySource

 Forgot password?
 Register
Search
View: 2323|Reply: 21

Little question. ^-^

[Copy link]

2

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Great Britain

Post time: 2020-3-12 17:00:01
| Show all posts |Read mode
public string zxlu, lxlr, sjbs, xxcx, rzck, xxts;

string a = '1,2,5'

How to loop through assignments:

zxlu = "-" lxlr = "-" rzck = "-"

Others are:

sjbs = "." xxcx = "." xxts = "."
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-6-6 21:15:01
| Show all posts
What is loop assignment
Reply

Use magic Report

0

Threads

119

Posts

67.00

Credits

Newbie

Rank: 1

Credits
67.00

 China

Post time: 2020-6-10 23:00:01
| Show all posts
What do you want to do?
Reply

Use magic Report

0

Threads

15

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-6-20 15:15:01
| Show all posts
The landlord explained too vaguely;;;; Let everyone help you solve it?!
Reply

Use magic Report

2

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-18 14:30:01
| Show all posts
The problem is this.
public string zxlu,lxlr,sjbs,xxcx,rzck,xxts;

string a='1,2,5'


zxlu corresponds to 1 if there is a corresponding relationship zxlu="-"
lxlr corresponds to 2 .............. lxlr="-"
sjbs corresponds to 3 if there is no corresponding relationship sjbs="."
xxcx corresponds to 4 if there is no corresponding relationship xxcx="."
rzck corresponds to 5 if there is a corresponding relationship rzck="-"
xxts corresponds to 6 if there is no corresponding relationship xxts="."

Do you understand?? I see if you have a special way to solve this cycle problem???
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-7-18 21:45:01
| Show all posts
If zxlu, lxlr, sjbs, xxcx, rzck, xxts are fixed, there are just a few, and there is no need to loop. It seems that there is nothing to loop. The loop must be conditional.
Reply

Use magic Report

2

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-19 10:00:01
| Show all posts
Upstairs, my string a='1,2,5' is a changed value. I don't know how much it will be next time?? Why not loop?
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 Turkey

Post time: 2020-7-19 10:45:01
| Show all posts
string a='1,2,5' Is the change regular, such as increasing or decreasing, and how long is the step?
Reply

Use magic Report

2

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-7-19 11:30:01
| Show all posts
string a='1,2,5' next time may be:
string a='1,3,5'
..
string a='6,2,5'

There is no rule, but there is a corresponding relationship with zxlu, lxlr, sjbs, xxcx, rzck, xxts...

So we need to use loops, I am dealing with it now.

IndexOf("6",0)>=0 means this variable contains "6", then xxts="-"

Judged 6 times. I see if there is a simpler way to deal with this problem...

Thank you upstairs.
Reply

Use magic Report

0

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-19 11:45:01
| Show all posts
The expression is still unclear!!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list