!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/doc/slang-1.4.5/html/   drwxr-xr-x
Free 318.39 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     slangfun-4.html (5.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
S-Lang Run-Time Library Reference: Version 1.4.0: Functions that Manipulate Structures Next Previous Contents

4. Functions that Manipulate Structures

4.1 _push_struct_field_values

Synopsis

Push the values of a structure's fields onto the stack

Usage

Integer_Type num = _push_struct_field_values (Struct_Type s)

Description

The _push_struct_field_values function pushes the values of all the fields of a structure onto the stack, returning the number of items pushed. The fields are pushed such that the last field of the structure is pushed first.

See Also

get_struct_field_names, get_struct_field

4.2 get_struct_field

Synopsis

Get the value associated with a structure field

Usage

x = get_struct_field (Struct_Type s, String field_name)

Description

The get_struct_field function gets the value of the field whose name is specified by field_name of the structure s.

Example

The following example illustrates how this function may be used to to print the value of a structure.

      define print_struct (s)
      {
         variable name;

         foreach (get_struct_field_names (s))
           {
             name = ();
             value = get_struct_field (s, name);
             vmessage ("s.%s = %s\n", name, string(value));
           }
      }
See Also

set_struct_field, get_struct_field_names, array_info

4.3 get_struct_field_names

Synopsis

Retrieve the field names associated with a structure

Usage

String_Type[] = get_struct_field_names (Struct_Type s)

Description

The get_struct_field_names function returns an array of strings whose elements specify the names of the fields of the struct s.

Example

The following example illustrates how the get_struct_field_names function may be used to print the value of a structure.

      define print_struct (s)
      {
         variable name, value;

         foreach (get_struct_field_names (s))
           {
             name = ();
             value = get_struct_field (name);
             vmessage ("s.%s = %s\n", name, string (value));
           }
      }
See Also

_push_struct_field_values, get_struct_field

4.4 is_struct_type

Synopsis

Determine whether or not an object is a structure

Usage

Integer_Type is_struct_type (X)

Description

The is_struct_type function returns 1 if the the parameter refers to a structure or a user-defined type. If the object is neither, 0 will be returned.

See Also

typeof, _typeof

4.5 set_struct_field

Synopsis

Set the value associated with a structure field

Usage

set_struct_field (s, field_name, field_value)

   Struct_Type s;
   String_Type field_name;
   Generic_Type field_value;
Description

The set_struct_field function sets the value of the field whose name is specified by field_name of the structure s to field_value.

See Also

get_struct_field, get_struct_field_names, set_struct_fields, array_info

4.6 set_struct_fields

Synopsis

Set the fields of a structure

Usage

set_struct_fields (Struct_Type s, ...)

Description

The set_struct_fields function may be used to set zero or more fields of a structure. The fields are set in the order in which they were created when the structure was defined.

Example

    variable s = struct { "name", "age", "height" };
    set_struct_fields (s, "Bill", 13, 64);
See Also

set_struct_field, get_struct_field_names


Next Previous Contents

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0044 ]--