-
dim x as long 'New.
get #1, ,r2 'Read the record of R2 from the first point in channel 1; get 1, 2, r2 read the 2nd record of r2 from inside channel 1.
if instr(1, ,s1) >0 then 'Start the search from the first character, and check whether there is a character in the record R2 is S1
x=x+1 'New.
if x=1 then 'New.
true==
else 'New.
Here's the second record.
exit do
end if 'New.
end if
loop
-
Add static index as long to the definition, assign the initial value to 1, and then index=seek(1), change seek to seek
#1,index
-
The seek function returns a long, specifying the current read and write location in the file opened by the open statement.
dim myrecord as record 'Declaring variables.
open "testfile" for random as #1 len = len(myrecord)
do while not eof(1) 'Cycle to the end of the file.
get #1, ,myrecord 'Read in the next record.
seek(1) 'The record number is displayed in the immediate window.
loopclose #1 'Close the file.
-
Check the file write statement or file content, which may be an integer multiple of the record length when the actual file size is not equal to the record.
-
You add 1, of course, to a decimal. 、
-
Generally starts with 1.
dim const position as integer=2dim myrandomfile as string*30open for random acess read as #1 len=len(myrandomfile)
get 1,position,myrandomfile,myrandomfile after the string variables myrandomfile is stored in the myrandomfile.
-
The lookup generally looks like this.
Define a dynamic array.
First, get the total number of records according to the file size and record size, and then redim the dynamic array just now, and then use the for statement to query in the dynamic data, instead of operating on the file, which is too troublesome to directly manipulate the file.
If you are working with large amounts of data, we recommend that you use a database system instead of a file system.
-
If it's just for display, it's recommended to use tags. This one is a little "cheaper".
If you need to make progress on the display, consider using a text box.
It is not recommended to print directly onto the form, as the default position starts in the top left corner. In order to look good, you have to carefully set the vertical and horizontal cursors, which are not as direct as the above two.
-
Labels or text boxes are fine.
-
Is it that the record number that was found last time was deleted when it was deleted, but it was not updated when it was searched, resulting in confusion of the record number?
-
The record number that was last found was deleted when it was deleted, but it was not updated when it was searched, resulting in confusion of the record number!
-
1 all get 1, ,c
To change to get 1, i, c
Also, if a = 0 then
1end if
To change: if a = 0 then
1close #
exit sub
end if
-
int(rnd()*This is a vb statement, what's the use of you putting it in double quotes and sending it to the database server? It is necessary to distinguish the difference between VB statements and SQL statements
dim i as integer
i= int(rnd()*
select * from Table 1 where id=" & i
-
It's just that you forget to define which variable, it's easy to find where the error message is.
Let's give you a method.,This method is set up.,You can change it to read.,If you can read the configuration, it's no problem, right? >>>More
It refers to the path where the current program is located, if the program is not compiled when it is executed, that is, when the program is run in the environment of VB, its current path is in the installation directory of VB, and yours" "There is no need to add a space before it. >>>More
The reading is correct, but the display of MATLAB only shows four decimal places, you can see the exact value by copying the data read into the workspace in MATLAB into XLS.
I don't understand how to use recursion in your program**, if you just don't let the string with 4 be generated, use a condition. >>>More
Check if the file exists.