ADMB Documentation
-a65f1c97
Main Page
Function Reference
Classes
Source Code
Related Pages
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
tools99
val.cpp
Go to the documentation of this file.
1
8
#include <
fvar.hpp
>
9
#include <stdio.h>
10
11
void
val
(
const
adstring
& s,
int
& v,
int
& code)
12
{
13
int
z;
14
if
( (s.
size
() > 2) && (s(1,2) ==
adstring
(
"0x"
) ))
15
z = sscanf((
const
char
*)s,
"%i"
, &v);
16
else
17
z = sscanf((
const
char
*)s,
"%d"
, &v);
18
19
if
(z != 1)
20
code = 1;
21
else
22
code = 0;
23
}
24
25
int
val
(
const
adstring
& s)
26
{
27
int
v;
28
int
code;
29
30
val
(s, v, code);
31
32
return
v;
33
}
adstring::size
size_t size() const
Definition:
string.cpp:58
adstring
Definition:
adstring.hpp:70
val
void val(const adstring &s, int &v, int &code)
Definition:
val.cpp:11
fvar.hpp
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Generated on Wed Sep 7 2022 00:01:30 for ADMB Documentation by
1.8.5