Easy language array member reference subscript exceeds the custom range to find the master

Updated on technology 2024-05-22
7 answers
  1. Anonymous users2024-02-11

    Call format: Logical object Send data (text type to receive customer, general type to send data, integer type maximum wait time ) System core support library - > server.

    Product Name: send

    Send data to a specified customer who has already connected. Returns true for success and false for failure. This command is a primary object member command.

    The name of parameter <1> is "Receiving Customer" and the type is "Text". The text of the customer's address returned for the call to the Get Back Customer method.

    The name of parameter <2> is "To send data" and the type is "General (all)". The data to be sent must be of the basic data type of the system.

    Parameter <3> can be omitted because it has the name "Maximum Wait Time" and the type "Integer (int)". Specifies the maximum amount of time to wait for the delivery to be successful, in seconds. If this parameter is omitted, the default parameter is infinite waiting.

    OS Requirements: Windows

    You look at here, the first argument d[5] of your command to send data is wrong, here it should be the name of the receiving customer. You've written the data sent to the medicine.

  2. Anonymous users2024-02-10

    Your **,d split text (c, "Not right here.

    Since your array is 0 and d [5] is 5 here, it should be changed to: add member (d, split text (c, "That's right.

  3. Anonymous users2024-02-09

    Your d[5] shouldn't just write 5, it's easy to make mistakes, because the array d doesn't necessarily have 5 members, you should be there. Add a variable to the second parameter of the first (,) of the counting cycle to record several times, and then put this variable in the subscript of d, for example:

    Version 2 counts the first cycle (a, variable).

    Server 1Send data (d [variable], customer information [e], count the end of the cycle ().

  4. Anonymous users2024-02-08

    This is because the range of the value is beyond the data in the database, that is, it does not rely on the data value in the database, so this kind of prompt will definitely appear, for example, there are only two data 1 and 2 in the database, but the value of 3 in the programmed program will be taken, which will cause the database to not recognize, and then the program will be interrupted.

    The general easy-language programmer will use regular expressions, clear things to cut the text, and get the text from the network for segmentation, and the array member reference subscript is beyond the definition range.

  5. Anonymous users2024-02-07

    This can't be seen just by looking at **, because whether there is an error or not is related to the data, and you have no data to shoot it.

    For example: <>

    If the + sign part is wrong, it may be that there are no four parts after the variable [3] is divided. So this kind of error needs to be debugged, and others can't see ** Potato to help you change it.

  6. Anonymous users2024-02-06

    Reason for error: The byte set of your "general ** content" is estimated to be empty (no matter what Yu Zheng obtains), or there is no byte set of Chinese colons in the middle, so that after splitting, it will definitely not become an array, right, that is, the number of array members is 0, and destroying your next line ** directly uses the split content [1], referencing a non-existent array element, it will definitely be wrong.

    Improvement method years of song:

    Before using the split content[1], check the number of members of the array, use the command "take the number of members of the array ()", and then determine whether its value is 0 or not, and then reference the array element. (In the future, you must check before programming using arrays, so that it is not easy to cause bugs.) )

    If your general ** content must contain the byte set of Chinese colons. That is, there was a failure in the data you retrieved before, and the data you retrieved was empty. Check the check.

    But also look at method 1, it's better to write an exception handler, otherwise the program will hang once it crashes.

    Hit with all hands. Hope!

  7. Anonymous users2024-02-05

    1. Reason: Because the array members taken out do not exist, assuming that the array to be taken has only 2 members, and the third member is taken back, it will definitely prompt this kind of wrong answer.

    2. When the general easy language programmer uses regular expressions, splits the text, and obtains the text from the network for segmentation, the array member reference subscript is beyond the definition range.

    3. The prevention method is very simple, that is, when taking the array members, first judge whether the number of array members is normal.

    The command you need to use is to take the number of array members (), which is described in detail in the easy language.

Related questions
13 answers2024-05-22

This error occurs because you are accessing an array element that is outside the range defined by the array, e.g. if you define an array[10], but you want to access array[100]. >>>More

6 answers2024-05-22

I'm not going to do it, but I'll give you an idea:

List the names of all the files first, then use the charms to sort them and correspond to them. It's a simple problem, but it's too complicated to implement. >>>More

10 answers2024-05-22

Hotkey. Registration (Tab 1.)Take the window handle ()0, F1, > register F1 >>>More

9 answers2024-05-22

If you don't change the program, it won't change. Be careful not to confuse the concepts of system and procedure. The QQ** you wear with the SkinSharp program will not change because your computer** is changed to "classic".

15 answers2024-05-22

Doesn't the key wizard come with a footstep?,There's this function.,Find it yourself.。