Sponsored Content
Full Discussion: Mod
Top Forums Programming Mod Post 92190 by Perderabo on Thursday 8th of December 2005 09:19:33 AM
Old 12-08-2005
C has a mod operator: % just use that. Note the similarity to / for division...

int quot remain;
quot=101/5;
remain=101%5;
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mod on %RANDOM

I use %random to generate random number but i want to mod it so i get random number below 50 only in ksh script how can i do it x=random % 50 doesn't work help is appreciated. Is there any other way i get generate random number below 50 in ksh.any other function. Plz provide an example... (4 Replies)
Discussion started by: er_zeeshan05
4 Replies

2. Filesystems, Disks and Memory

Need help with MOD Disk copying

Hello, we are running Irix 6.5 on our octane/sgi computers - these computers come with an external Sony MOD drive attached via a scsi cable. We have backed info to 2.3 gig MOD disks over the years and woule like to duplicate the MOD's. I believe there are 3 ways to do this: add a second... (1 Reply)
Discussion started by: drew_holm
1 Replies
OID(3pm)						User Contributed Perl Documentation						  OID(3pm)

NAME
NetSNMP::OID - Perl extension for manipulating OIDs SYNOPSIS
use NetSNMP::OID; my $oid = new NetSNMP::OID('sysContact.0'); if ($oid < new NetSNMP::OID('ifTable')) { do_something(); } my @numarray = $oid->to_array(); # appending oids $oid = new NetSNMP::OID('.1.3'); $oid += ".6.1"; # -> .1.3.6.1 # appending index strings $oid2 = $oid + ""wes""; # -> .1.3.6.1.3.119.101.115 $oid3 = $oid + "'wes'"; # -> .1.3.6.1.119.101.115 $len = $oid3->length(); # -> 7 # retrieving indexes from an oid: $arrayref = $tableoid->get_indexes() DESCRIPTION
The NetSNMP::OID module is a simple wrapper around a C-based net-snmp oid (which is an array of unsigned integers). The OID is internally stored as a C array of integers for speed purposes when doing comparisons, etc. The standard logical expression operators (<, >, ==, ...) are overloaded such that lexographical comparisons may be done with them. The + operator is overloaded to allow you to append stuff on to the end of a OID, like index segments of a table, for example. EXPORT int snmp_oid_compare(oid1, oid2) int compare(oid1, oid2) AUTHOR
Wes Hardaker, <hardaker@users.sourceforge.net> SEE ALSO
SNMP, perl. Copyright Copyright (c) 2002 Networks Associates Technology, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2009-10-29 OID(3pm)
All times are GMT -4. The time now is 11:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy