• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Fprintf函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Fprintf函数的典型用法代码示例。如果您正苦于以下问题:C++ Fprintf函数的具体用法?C++ Fprintf怎么用?C++ Fprintf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Fprintf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: MOD_OPT

int MOD_OPT(ChkMix)(Option *Opt,Model *Mod)
{
  TYPEOPT* ptOpt=( TYPEOPT*)(Opt->TypeOpt);
  TYPEMOD* ptMod=( TYPEMOD*)(Mod->TypeModel);
  int status=OK;

  if (ptOpt->Maturity.Val.V_DATE<=ptMod->T.Val.V_DATE)
    {
      Fprintf(TOSCREENANDFILE,"Current date greater than maturity!\n");
      status+=1;
    };
  if ((ptOpt->DownOrUp).Val.V_BOOL==DOWN)
    {

      if ( ((ptOpt->Limit.Val.V_NUMFUNC_1)->Compute)((ptOpt->Limit.Val.V_NUMFUNC_1)->Par,ptMod->T.Val.V_DATE)>ptMod->S0.Val.V_PDOUBLE)
        {
          Fprintf(TOSCREENANDFILE,"Limit Down greater than spot!\n");
          status+=1;
        };


    }
  if ((ptOpt->DownOrUp).Val.V_BOOL==UP)
    {
      if ( ((ptOpt->Limit.Val.V_NUMFUNC_1)->Compute)((ptOpt->Limit.Val.V_NUMFUNC_1)->Par,ptMod->T.Val.V_DATE)<ptMod->S0.Val.V_PDOUBLE)
        {
          Fprintf(TOSCREENANDFILE,"Limit Up lower than spot!\n");
          status+=1;
        };

    }
  return status;
}
开发者ID:jayhsieh,项目名称:premia-13,代码行数:33,代码来源:rstemperedstable1d_lim.c


示例2: MOD_OPT

int MOD_OPT(ChkMix)(Option *Opt,Model *Mod)
{
  TYPEOPT* ptOpt=( TYPEOPT*)(Opt->TypeOpt);
  TYPEMOD* ptMod=( TYPEMOD*)(Mod->TypeModel);
  int status=OK;

  if (ptOpt->Maturity.Val.V_DATE<=ptMod->T.Val.V_DATE)
    {
      Fprintf(TOSCREENANDFILE,"Current date greater than maturity!\n");
      status+=1;
    };
  if ((ptOpt->MinOrElse).Val.V_BOOL==MINIMUM)
    {
      if ((ptOpt->PathDep.Val.V_NUMFUNC_2)->Par[4].Val.V_PDOUBLE>ptMod->S0.Val.V_PDOUBLE)
	{
	  Fprintf(TOSCREENANDFILE,"Minimum greater than spot!\n");
	  status+=1;
	};
    }
  if ((ptOpt->MinOrElse).Val.V_BOOL==MAXIMUM)
    {
      if ((ptOpt->PathDep.Val.V_NUMFUNC_2)->Par[4].Val.V_PDOUBLE<ptMod->S0.Val.V_PDOUBLE)
	{
	  Fprintf(TOSCREENANDFILE,"Maximum lower than spot!\n");
	  status+=1;
	};
    }
  return status;
}
开发者ID:jayhsieh,项目名称:premia-13,代码行数:29,代码来源:mer1d_pad.c


示例3: WriteListAnalysis

void WriteListAnalysis(FILE * f, int i, char *list_type)
{
    int k, i1;
    VARPTR var;

    i1 = i + 1;

    AddDeclare1(DEC_INT, "m%d", i1);
    AddDeclare1(DEC_INT, "n%d", i1);
    AddDeclare1(DEC_INT, "l%d", i1);
    Fprintf(f, indent, "GetRhsVar(%d,\"%s\",&m%d,&n%d,&l%d);\n", i1, list_type, i1, i1, i1);
    for (k = 0; k < nVariable; k++)
    {
        var = variables[k];
        if ((var->list_el != 0) && (strcmp(var->list_name, variables[i]->name) == 0) && var->present)
        {
            Fprintf(f, indent, "/* list element %d %s */\n", var->list_el, var->name);
            if (RHSTAB[var->type].type != var->type)
            {
                fprintf(stderr, "Bug in intersci : Something wrong in RHSTAB\n");
            }
            (*(RHSTAB[var->type].fonc)) (f, var, 0);
        }
    }
}
开发者ID:rossdrummond,项目名称:scilab,代码行数:25,代码来源:intersci-n.c


示例4: PrintList_hkl

static void PrintList_hkl(void)
{
  int              iListFcal;
  T_ListFcal       *lfcal;
  Fprec            d, twotheta;


  Fprintf(stdout, ">Begin List_hkl\n");
  Fprintf(stdout, "#  h   k   l    d     2-Theta\n");

  lfcal = ListFcal;

  for (iListFcal = 0; iListFcal < nListFcal; iListFcal++)
  {
    if (lfcal->h || lfcal->k || lfcal->l)
    {
      twotheta = TwoThetaDeg(lfcal->Q);
      d = lfcal->Q; if (d != 0) d = 1. / sqrt(d);

      Fprintf(stdout, " %3d %3d %3d %8.4f %7.3f",
        lfcal->h, lfcal->k, lfcal->l, d, twotheta);

      putc('\n', stdout);
    }

    lfcal++;
  }

  Fprintf(stdout, ">End List_hkl\n");
  putc('\n', stdout);
}
开发者ID:stefsmeets,项目名称:focus_package,代码行数:31,代码来源:sitefcal.c


示例5: MOD_OPT

int MOD_OPT(ChkMix)(Option *Opt,Model *Mod)
{
  TYPEOPT* ptOpt=(TYPEOPT*)(Opt->TypeOpt);
  TYPEMOD* ptMod=(TYPEMOD*)(Mod->TypeModel);
  int status=OK;
	
  /*Custom*/
  if (ptOpt->Maturity.Val.V_DATE<=ptMod->T.Val.V_DATE)
    {
      Fprintf(TOSCREENANDFILE,"Current date greater than maturity!\n");
      status+=1;
    };
  if ( ((ptOpt->LowerLimit.Val.V_NUMFUNC_1)->Compute)((ptOpt->LowerLimit.Val.V_NUMFUNC_1)->Par,ptMod->T.Val.V_DATE)>ptMod->S0.Val.V_PDOUBLE && (ptOpt->Parisian).Val.V_BOOL==WRONG)
    {
      Fprintf(TOSCREENANDFILE,"Limit Down greater than spot!\n");
      status+=1;
    };
  
  if ( ((ptOpt->UpperLimit.Val.V_NUMFUNC_1)->Compute)((ptOpt->UpperLimit.Val.V_NUMFUNC_1)->Par,ptMod->T.Val.V_DATE)<ptMod->S0.Val.V_PDOUBLE && (ptOpt->Parisian).Val.V_BOOL==WRONG)
    {
      Fprintf(TOSCREENANDFILE,"Limit Up lower than spot!\n");
      status+=1; 
  };
  /*EndCustom*/

  return status;
}
开发者ID:jayhsieh,项目名称:premia-13,代码行数:27,代码来源:bs1d_doublim.c


示例6: PrintPhaseCode

static void PrintPhaseCode(T_PhaseCode *code)
{
  int      iCT, iTab;

  static int TabSymbol[] =
   {
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
     '-', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a',
     '0'
   };


  Fprintf(stdout, "PhaseCode(");

  for (iCT = 0; iCT < nActivePhase; iCT++)
  {
    if (iCT % 72 == 0) putc('\n', stdout);

        iTab = (code[iCT] + 9) / 18;
    if (iTab >= 0 && iTab < (sizeof TabSymbol / sizeof (*TabSymbol)))
      putc(TabSymbol[iTab], stdout);
    else
      putc('~', stdout);
  }

  Fprintf(stdout, "\n)");
}
开发者ID:stefsmeets,项目名称:focus_package,代码行数:27,代码来源:trialoop.c


示例7: FSelectPricing

int FSelectPricing(char InputFile[MAX_LINE][MAX_CHAR_LINE],int user,Model *pt_model,Option *pt_option,Pricing **pricing,Pricing **result)
{
  int i=-1;
  char dummy[MAX_CHAR_X3];

  if ((strlen(pt_model->ID)+1+strlen(pt_option->ID))>=MAX_CHAR_X3)
    {
      Fprintf(TOSCREEN,"%s\n",error_msg[PATH_TOO_LONG]);
      exit(WRONG);
    }

  strcpy(dummy,pt_model->ID);
  strcat(dummy,"_");
  strcat(dummy,pt_option->ID);

  do
    { 
      i=i+1;
    }
  while ((strcmp(dummy,pricing[i]->ID)!=0) && (pricing[i+1]!=NULL));

  if (strcmp(dummy,pricing[i]->ID)==0)
    {
      *result=pricing[i];
      return ((*result)->CheckMixing)(pt_option,pt_model) ;
    }
  Fprintf(TOSCREEN,"No choice available!\n");

  return PREMIA_NONE;
}
开发者ID:jayhsieh,项目名称:premia-13,代码行数:30,代码来源:ftools.c


示例8: VRML_Begin

void VRML_Begin( FILE *f )
{
	fprintf( f, VRML_header );
	fprintf( f, "children [\n" );
	Fprintf( f, "\t\tNavigationInfo { headlight FALSE }\n" );
	Fprintf( f, "\t\tDirectionalLight {\n\t\t direction 0 -5 1 }\n\n" );
}
开发者ID:rauls,项目名称:iReporter,代码行数:7,代码来源:engine_graphvrml.cpp


示例9: large_deflate

u_long large_deflate (u_char *compr, u_long compr_len,
	u_char *uncompr, u_long uncompr_len) {

   z_stream c_stream; /* compression stream */
   int err;

   c_stream.zalloc = (alloc_func)0;
   c_stream.zfree = (free_func)0;
   c_stream.opaque = (voidpf)0;

   err = deflateInit(&c_stream, Z_BEST_SPEED);
   if (check_error(err, "deflateInit", c_stream.msg)) return 0;

   c_stream.next_out = compr;
   c_stream.avail_out = (u_int)compr_len;

   c_stream.next_in = uncompr;
   c_stream.avail_in = (u_int)uncompr_len;
   err = deflate(&c_stream, Z_NO_FLUSH);
   if (check_error(err, "deflate", c_stream.msg)) return 0;
   if (c_stream.avail_in != 0) {
      Fprintf(stderr, "deflate not greedy");
   }

   err = deflate(&c_stream, Z_FINISH);
   if (err != Z_STREAM_END) {
      Fprintf(stderr, "deflate should report Z_STREAM_END");
   }
   err = deflateEnd(&c_stream);
   if (check_error(err, "deflateEnd", c_stream.msg)) return 0;

   /* Fprintf(stdout, "large_deflate(): OK\n"); */

   return c_stream.total_out;
}
开发者ID:sedic,项目名称:xcircuit-3.8,代码行数:35,代码来源:flate.c


示例10: mmap_validate_opts

/************************************************************************
 *									*
 * mmap_validate_opts() - Validate Memory Mapped Test Options.		*
 *									*
 * Description:								*
 *	This function verifies the options specified for memory mapped	*
 * file testing are valid.						*
 *									*
 * Inputs:	dip = The device information pointer.			*
 *									*
 * Return Value:							*
 *		Returns SUCESS / FAILURE = Valid / Invalid Options.	*
 *									*
 ************************************************************************/
int
mmap_validate_opts (struct dinfo *dip)
{
    int status = SUCCESS;

    /*
     * For memory mapped I/O, ensure the user specified a limit, and
     * that the block size is a multiple of the page size (a MUST!).
     */
    if (mmap_flag) {
	if (data_limit == INFINITY) {
	    Fprintf ("You must specify a data limit for memory mapped I/O.\n");
	    status = FAILURE;
	} else if (block_size % page_size) {
	    Fprintf (
	"Please specify a block size modulo of the page size (%d).\n", page_size);
	    status = FAILURE;
	} else if (aio_flag) {
	    Fprintf ("Cannot enable async I/O with memory mapped I/O.\n");
	    status = FAILURE;
	} else {
	    status = validate_opts (dip);
	}
    }
    return (status);
}
开发者ID:wanghao-xznu,项目名称:vte,代码行数:40,代码来源:dtmmap.c


示例11: Fprintf

void Nuc3ptStru::PrintTheTag(FILE *fp)
{
  G.printTag(fp);
  Fprintf(fp,"_") ;
  D.printTag(fp) ;
  if(strlen(tag)>0) Fprintf(fp,"_%s",tag) ;
} 
开发者ID:DeanHowarth,项目名称:QUDA-CPS,代码行数:7,代码来源:Nuc3pt.C


示例12: WriteHeader

void WriteHeader(FILE * f, char *fname0, char *fname)
{
    Fprintf(f, indent, "\nint %s%s(char *fname)\n", fname0, fname);
    Fprintf(f, indent, "{\n");
    indent++;
    WriteDeclaration(f);
}
开发者ID:rossdrummond,项目名称:scilab,代码行数:7,代码来源:intersci-n.c


示例13: flags_set_sync_p2

static void
flags_set_sync_p2( sync_vars_t *svars, sync_rec_t *srec, int t )
{
	int nflags, nex;

	nflags = (srec->flags | srec->aflags[t]) & ~srec->dflags[t];
	if (srec->flags != nflags) {
		debug( "  pair(%d,%d): updating flags (%u -> %u)\n", srec->uid[M], srec->uid[S], srec->flags, nflags );
		srec->flags = nflags;
		Fprintf( svars->jfp, "* %d %d %u\n", srec->uid[M], srec->uid[S], nflags );
	}
	if (t == S) {
		nex = (srec->status / S_NEXPIRE) & 1;
		if (nex != ((srec->status / S_EXPIRED) & 1)) {
			if (nex && (svars->smaxxuid < srec->uid[S]))
				svars->smaxxuid = srec->uid[S];
			Fprintf( svars->jfp, "/ %d %d\n", srec->uid[M], srec->uid[S] );
			debug( "  pair(%d,%d): expired %d (commit)\n", srec->uid[M], srec->uid[S], nex );
			srec->status = (srec->status & ~S_EXPIRED) | (nex * S_EXPIRED);
		} else if (nex != ((srec->status / S_EXPIRE) & 1)) {
			Fprintf( svars->jfp, "\\ %d %d\n", srec->uid[M], srec->uid[S] );
			debug( "  pair(%d,%d): expire %d (cancel)\n", srec->uid[M], srec->uid[S], nex );
			srec->status = (srec->status & ~S_EXPIRE) | (nex * S_EXPIRE);
		}
	}
}
开发者ID:leifwalsh,项目名称:isync,代码行数:26,代码来源:sync.c


示例14: check_error

int check_error(int err, char *prompt, char *msg) {
   if (err != Z_OK) {
      Fprintf(stderr, "%s error: %d", prompt, err);
      if (msg) Fprintf(stderr, "(%s)", msg);
      Fprintf(stderr, "\n");
      return 1;
   }
   return 0;
}
开发者ID:sedic,项目名称:xcircuit-3.8,代码行数:9,代码来源:flate.c


示例15: FSelectTest

int FSelectTest(char InputFile[MAX_LINE][MAX_CHAR_LINE],int user,Planning *pt_plan,
                Pricing *pt_pricing, Option *opt,Model *mod,PricingMethod *met,DynamicTest **test)
{
  int i,ii,isub,k,j;
  DynamicTest** list;
  DynamicTest* dummy;
  char line[MAX_CHAR_LINE];
  if (pt_plan->Action=='t')
    {
      Fprintf(TOSCREEN,"\n_______________________TEST CHOICE:\n\n");
      list=pt_pricing->Test;
      i=0;isub=0;
      dummy=*list;
      while ( dummy !=NULL)
        {
          if( (dummy->CheckTest)(opt,mod,met) == OK)
            {   
              for(ii=0;ii<MAX_LINE;ii++){
                j=0;
                while(j<=(signed)(strlen(InputFile[ii])-strlen((pt_pricing->Test[i])->Name)))
                  {
                    if( (j==0 || (j>0 && InputFile[i][j-1]==' ')) &&
                        ( InputFile[i][j+strlen((pt_pricing->Test[i])->Name)] == ' ' ||
                          InputFile[i][j+strlen((pt_pricing->Test[i])->Name)] == '\0')
                      ){
                      for(k=j;k<j+(signed)strlen((pt_pricing->Test[i])->Name);k++)
                        line[k-j] = InputFile[ii][k];
                      line[j+(signed)strlen((pt_pricing->Test[i])->Name)]='\0';
                      if (StrCasecmp((pt_pricing->Test[i])->Name,line) == 0){
                        *test=pt_pricing->Test[i];
                        (*test)->Init(*test, opt);
                        goto ok;
                      }
                    }
                    j++;
                  }
              }
              isub++;
            }
          i=i+1;
          list++;dummy=*list;
        }


      if (isub==0)
        {
          Fprintf(TOSCREEN,"No test available!\n");
        }
      else
        {
          Fprintf(TOSCREEN,"No tests found, exiting....\n");
        }
    }
ok:
  return OK;
}
开发者ID:jayhsieh,项目名称:premia-13,代码行数:56,代码来源:ftools.c


示例16: DoSitePhases

void DoSitePhases(void)
{
  int           iCT, iCTD, code;
  T_CodeTransl  *CT;
  T_CTData      *CTD;
  Fprec         CC, R;


  if (nSite < 1) return;

  PrepListSE();

  SiteCT_Fcal(CodeTransl, nActivePhase);
  CalcCCandR(CodeTransl, nActivePhase, &CC, &R);

  Fprintf(stdout, "# SiteCT_Fcal  CC = %.6g  R = %.3f\n\n", CC, R);

  CT = CodeTransl;

  for (iCT = 0; iCT < nActivePhase; iCT++)
  {
    Phi2Phi360(CT->FcalPhi, CT->Phi360Fcal);

    if (Debug0) /* Debug: Print SitePhases */
    Fprintf(stdout, "SP  %3d %3d %3d  %3d  %8.3f\n",
      CT->FobsRaw->h, CT->FobsRaw->k, CT->FobsRaw->l,
      CT->Phi360Fcal, CT->FcalPhi / PIover180);

    if (CT->nCTData < 1)
      InternalError("CT->nCTData < 1");

    CTD = CT->CTData;

    code = CT->Phi360Fcal - CTD->TH;
    if (code < 0) code += 360;

    if (CT->FobsRaw->PhaseRestriction >= 0)
    {
      if (code != 0 && code != 180)
        CheckRestrictedPhase(CT, &code);
    }

    for (iCTD = 0; iCTD < CT->nCTData; iCTD++)
    {
      CTD->TH += code;
      if (CTD->TH >= 360) CTD->TH -= 360;

      CTD++;
    }

    CT++;
  }

  FreeListSE();
}
开发者ID:stefsmeets,项目名称:focus_package,代码行数:55,代码来源:sitefcal.c


示例17: ListRestCond

void ListRestCond(FILE *fpout, T_hklCond *rst, int rstn, int debug)
{
  int   i,j,n,m;
  char  hkl[3]="hkl";
  int   x[3];
  int   S[3][3];
  int   first;
  char  buf[128];


  Fprintf(fpout, "Reflections with phase restriction\n");

  for(m=0;m<rstn;m++,rst++) {
    if (!debug && !rst->Exist ) continue;
    if (debug) Sprintf(buf,"%02d%c ", rst->iSymTr, rst->Exist?' ':'-');
    else buf[0]=0;
    (void) memcpy(S,rst->Mx,sizeof(S));
    (void) memcpy(x,rst->Gl,sizeof(x));

    for(j=0; j<3; j++){
      for(n=i=0; i<3; i++) if((n=S[i][j]) != 0) break;
      if(i==3)
        Sprintf(&buf[strlen(buf)],"0");
      else {
        if (n==1) Sprintf(&buf[strlen(buf)],"%1c",hkl[i]);
        else if (n==-1) Sprintf(&buf[strlen(buf)],"-%1c",hkl[i]);
        else Sprintf(&buf[strlen(buf)],"%d%1c",n,hkl[i]);
      }
    }

    n = rst->Denom;
    Sprintf(&buf[strlen(buf)],": ");
    if(!rst->Exist) Sprintf(&buf[strlen(buf)],"<");
    for(i=0,j=0; i<3; i++) j+=abs(x[i] % n);
    if (j) {
      Sprintf(&buf[strlen(buf)],"%d deg (",180/n);
      for(i=0,first=1; i<3; i++) if(x[i] % n) {
        if(x[i] <0) Sprintf(&buf[strlen(buf)],"-");
        else if (!first) Sprintf(&buf[strlen(buf)],"+");
        if(abs(x[i]) != 1) Sprintf(&buf[strlen(buf)],"%1d",abs(x[i]));
        first=0;

        Sprintf(&buf[strlen(buf)],"%1c",hkl[i]);
      }
      Sprintf(&buf[strlen(buf)],")");
    } else {
      Sprintf(&buf[strlen(buf)],"0 deg");
    }
    if(!rst->Exist) Sprintf(&buf[strlen(buf)],">");

    Fprintf(fpout, "  %s\n", buf);
  }

  putc('\n', fpout);
}
开发者ID:stefsmeets,项目名称:focus_package,代码行数:55,代码来源:sgasciio.c


示例18: OptOpointer

void OptOpointer(FILE *f,VARPTR var)
{

  Fprintf(f,indent++,"if ( %sok == 0) {\n",var->name);
  Fprintf(f,indent,"%spos=iopos=iopos+1;\n",var->name);
  Fprintf(f,indent,"CreateSCO(iopos,&lr%d,%s);\n",
	  var->stack_position,data);
  AddDeclare1(DEC_INT,"lr%d",var->stack_position);
  Fprintf(f,--indent,"}\n");

}
开发者ID:rossdrummond,项目名称:scilab,代码行数:11,代码来源:opt.c


示例19: calcmom

void AlgFourierProp::ft(FILE *fp,MomentaList& mlist)
{
  char *fname="ft(FILE*,MomentaList&)";
  VRB.Func(cname,fname);
  
  //----------------------------------------------------------------
  // begin loop over momenta
  //----------------------------------------------------------------
  int nmom;
  for( nmom=0; nmom < mlist.size(); nmom++ ) 
    {
      //------------------------------------------------------------
      // Calculate single momenta
      //------------------------------------------------------------
      
      momprop=Float(0.0);
      
      calcmom(mlist[nmom]);
      
      //------------------------------------------------------------
      // Global sum
      //------------------------------------------------------------
      
      // 288 = 4 x 3(src) x 4 x 3(snk) x 2(re/im)
      // the final argument means which direction to exclude.
      // here 99 means NO exclusion and end up to be a global sum

      slice_sum((Float*)&momprop, 288, 99);
      
      //------------------------------------------------------------
      // Output to file
      //------------------------------------------------------------
      
      int s1,c1,s2,c2;
      Fprintf(fp,"MOMENTUM= %d %d %d %d \n",
              mlist[nmom].x(),
              mlist[nmom].y(),
              mlist[nmom].z(),
              mlist[nmom].t() );
      for( s1=0; s1<4; ++s1){ 
	for( c1=0; c1<3; ++c1){
	  for( s2=0; s2<4; ++s2){ 
	    for( c2=0; c2<3; ++c2){
	      Fprintf(fp, "%-25.15e %-25.15e \n",
		      (Float)momprop.wmat().d[s1].c[c1].d[s2].c[c2].real(),
		      (Float)momprop.wmat().d[s1].c[c1].d[s2].c[c2].imag());
	    }
	  }
	}
      }
    }   // end loop over momenta
}
开发者ID:DeanHowarth,项目名称:QUDA-CPS,代码行数:52,代码来源:alg_fourier_prop.C


示例20: PrintProfile

static void PrintProfile(const Fprec *ProfileCounts, int nProfileSteps,
                         const T_StdPeak *StdPeak)
{
  int          iPS;
  Fprec        TT, Counts, ScaleF, MaxScaledCounts, ESD;


  Fprintf(stdout, ">Begin stepscan\n");

  Fprintf(stdout, "@with g0\n");

  ScaleF = ProfileScaleFactor(ProfileCounts, nProfileSteps, StdPeak);

  MaxScaledCounts = 0.;

  for (iPS = 0; iPS < nProfileSteps; iPS++)
  {
        TT = iPS * ProfileStep;
    if (TT + ProfileStep * .5 < ProfileStart)
      continue;
    if (TT - ProfileStep * .5 > ProfileEnd)
      break;

    Counts = ProfileBackground + ProfileCounts[iPS] * ScaleF;

        ESD = AppSqrt(Counts);
    if (ESD < 0.001)
        ESD = 0.001;

    Fprintf(stdout, "%12.3f %12.2f %12.3f\n",
      TT, Counts, ESD);

    if (MaxScaledCounts < Counts)
        MaxScaledCounts = Counts;
  }

  if (MaxScaledCounts == 0.)
      MaxScaledCounts = ProfileReferenceMax;
  if (MaxScaledCounts == 0.)
      MaxScaledCounts = 1.;

  Fprintf(stdout, "&\n");
  Fprintf(stdout, "@autoscale\n");

  Fprintf(stdout, "@ world xmin %.6g\n", ProfileStart);
  Fprintf(stdout, "@ world xmax %.6g\n", ProfileEnd);
  Fprintf(stdout, "@ world ymin %.6g\n", 0.);
  Fprintf(stdout, "@ world ymax %.6g\n", MaxScaledCounts);

  Fprintf(stdout, ">End stepscan\n");
  putc('\n', stdout);
}
开发者ID:stefsmeets,项目名称:focus_package,代码行数:52,代码来源:sitefcal.c



注:本文中的Fprintf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Fraction函数代码示例发布时间:2022-05-30
下一篇:
C++ FoundTarget函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap