| |

VerySource

 Forgot password?
 Register
Search
View: 1452|Reply: 6

I'm annoying for execution results

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-16 18:20:01
| Show all posts |Read mode
long row
int col, oldcol, ret
row = getrow ()
oldcol = this.getcolumn ()
IF row <1 THEN
return 0
END IF
FOR col = 1 TO 1000
ret = this.setcolumn (col)
IF ret = -1 THEN
this.setcolumn (oldcol)
return col-1
END IF
NEXT
Reply

Use magic Report

0

Threads

13

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-21 18:27:01
| Show all posts
If there is no row with focus in the data window, return 0;
If there is a row with focus, the column number of the last column (col-1) is returned, and the focus is still set on the original column.If the number of columns is greater than 1000, there is no return value, and the focus is set to the 1000th column.
Reply

Use magic Report

0

Threads

13

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-21 18:45:01
| Show all posts
The landlord seems to be doing the problem.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-21 19:45:01
| Show all posts
Brothers come for a detailed explanation
Because I do n’t know about PB, I asked a friend
Reply

Use magic Report

0

Threads

100

Posts

53.00

Credits

Newbie

Rank: 1

Credits
53.00

 China

Post time: 2020-1-21 20:54:02
| Show all posts
long row
int col, oldcol, ret
row = getrow () // Get the current row of the data window (the row with focus)
oldcol = this.getcolumn () // Get the ordinal of the current column
IF row <1 THEN // Return 0 if there is no row with focus
return 0
END IF
FOR col = 1 TO 1000
ret = this.setcolumn (col) // Set the col column as the current column
IF ret = -1 THEN // Return -1 setting error
this.setcolumn (oldcol) // Set the current column to the original column
return col-1 // return the previous column of the error column
END IF
NEXT
Reply

Use magic Report

0

Threads

100

Posts

53.00

Credits

Newbie

Rank: 1

Credits
53.00

 China

Post time: 2020-1-21 21:27:01
| Show all posts
IF ret = -1 THEN //this.setcolumn(col) returns -1 to indicate that the focus was set incorrectly
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-4 18:45:01
| Show all posts
The code is simple, but, you have to say when it was written. . . . So as to judge
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