Macaulay2 Engine
Loading...
Searching...
No Matches

◆ fromStream< RingZZ >()

template<>
bool fromStream< RingZZ > ( std::istream & i,
const RingZZ & R,
ring_elem & result )

Definition at line 72 of file fromStream.cpp.

73{
74 while (isspace(i.peek())) i.get();
75
76 if (!isdigit(i.peek()) && i.peek() != '+' && i.peek() != '-') return false;
77
78 const int original_s_len = 100;
79 char original_s[original_s_len];
80 char *s_str = original_s;
81 char *s = s_str;
82 // int s_len = original_s_len;
83 // int len = 0;
84 while (isdigit(i.peek()))
85 {
86 // NOT DONE BEING WRITTEN!!!!!!
87 }
88 *s++ = '\0';
89
90 int a;
91 i >> a;
92 result = R.from_long(a);
93 return true;
94}
virtual ring_elem from_long(long n) const
Definition ZZ.cpp:110
void size_t s
Definition m2-mem.cpp:271
VALGRIND_MAKE_MEM_DEFINED & result(result)

References RingZZ::from_long(), result(), and s.