Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Question about "nameof"
Author Message
  Post subject:   Reply with quote
Thanks a lot, that worked!
Post Posted: Sat Aug 09, 2008 10:37 am
  Post subject:   Reply with quote
It still works as before by writing

setring `s`;
> ring r=0,x,dp;
> string s = nameof(basering);
> // define another ring
> ring r2 = real,x,dp;
> basering;
// characteristic : 0 (real)
// number of vars : 1
// block 1 : ordering dp
// : names x
// block 2 : ordering C

> back to the previous ring
> setring `s`;
> basering;
// characteristic : 0
// number of vars : 1
// block 1 : ordering dp
// : names x
// block 2 : ordering C



Another possibility is to use:

def d = basering;

setring d;
Post Posted: Fri Aug 08, 2008 8:33 pm
  Post subject:  Question about "nameof"  Reply with quote
Can anybody tell me what is wrong with the following code?
Code:
ring r = 0,(x,y,z),dp;
string s = nameof(basering);
setring s;

In other words, I try to grab the name of my basering into s, and want to switch to this ring later. How should I get this to work? Right now it tells me:
Code:
? s is no name of a ring/qring
? error occurred in STDIN line 14: `setring s; `

I strongly suspect this has worked for an old version of Singular (maybe 2.0).
Post Posted: Fri Aug 08, 2008 1:19 pm


It is currently Fri May 13, 2022 11:04 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group