---
name: "givelosig"
section: "3"
platform: "linux"
package: "alliance"
version: "5.1.1-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/givelosig"
---

# givelosig(3)

give a logical signal

## NAME

givelosig - give a logical signal

## SYNOPSYS

```
#include "mlo.h"
losig_list ∗givelosig(ptfig, index)
lofig_list ∗ptfig;
long index;
```

## PARAMETERS

- *ptfig*

  Pointer to the figure in which the signal should be seeked or created

- *index*

  Index of the signal to find or create

## DESCRIPTION

**givelosig** looks in the list of signals of the logical model pointed to by *ptfig* for a signal identified by its *index*. If this signal exists, then its pointer is returned, else, the signal is created, with direction, *DIR*, **UNKNOWN**, and *TYPE* **INTERNAL**, and, of course *INDEX* *index*, and the pointer is returned.

## RETURN VALUE

**givelosig** returns a pointer to the signal.

## EXAMPLE

```
#include "mlo.h"
losig_list ∗give_sig_by_name(figname, index)
char ∗figname;
long index;
{
   /∗ never fails ∗/
   return givelosig(getlofig(figname), index);
}
```

## SEE ALSO

**mbk**(1), [**lofig**(3)](/lofig/3.md), [**losig**(3)](/losig/3.md), [**addlosig**(3)](/addlosig/3.md), [**dellosig**(3)](/dellosig/3.md).
