# Example IntVector send 016

#### Description

This example first defines the method addValues. It then invokes the addMethod function to add the method in the Methods Dictionary. The method Increment will be then invoked by the send function calling the message in the Dictionary Methods Dictionary.

#### Details

Add a method named addValues which will add the values of all the fields in a Vector.

Define a Vector that contains the amount of checks written for the month.

 (define monthlyBills #(int| 400 2100 100 600) ) Returns: #

Invoke the method named addValues to compute the total amount checks written for the month.

The method can be invoked simply by name:

Notes and Hints

Dissecting the send command involves understanding the methods dictionary of any Analytic Information Server type. In general the send command is translated as a reference into the methods dictionary:

((ref (methodsOf (type object)) methodName object))

The statement :

is translated into

((ref (methodsOf (type monthlyBills)) addValues: ) monthlyBills)

Each statement segment results in:

 (type monthlyBills) Returns: IntVector (methodsOf (IntVector:)) Returns: # (ref (#) addValues: ) Returns: # ( # monthlyBills) Returns: 3200

#### Related Examples

Here are examples of the send function at work.

 BitVector send 018 Character send 011 CpxVector send 028 Date send 013 Dictionary send 004 Directory send 005 FltVector send 015 Function send 014 IntVector send 016 Lambda send 008 Lambda send 009 Matrix send 008 NumMatrix send 027 NumVector send 017 Number send 012 Pair send 019 ShortVector send 017 String send 001 Structure send 003 Symbol send 002 Vector send 006 Void send 009

Here is the link to the current function used in this example.

send

Here are a number of links to other related functions.

#### Argument Types

Here are the links to the data types of the arguments used in this example.

 IntVector Dictionary

Here are a number of links to examples having similar argument types.