亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? parse.c

?? 機(jī)器足球2D比賽程序 對trlen_base_2002的改進(jìn)
?? C
字號:
/*Copyright (c) 2000-2002, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University of Amsterdam nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*! \file Parse.C<pre><b>File:</b>          Parse.C<b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b>       Jelle Kok<b>Created:</b>       12/02/2001<b>Last Revision:</b> $ID$<b>Contents:</b>      class declarations of Parse class that can be used to               quickly parse specific string messages.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>12/02/2001       Jelle Kok       Initial version created</pre>*/#include "Parse.h"#include <ctype.h>    // needed for isdigit#include <math.h>     // needed for pow#include <string.h>   // needed for strlen/******************************************************************************//*********************** CLASS PARSE ******************************************//******************************************************************************//*! This method walks through the string starting at the character where strMsg    points to and stops when or the end of the string is reached or a non space    is reached. strMsg is updated to this new position.    \param strMsg pointer to a character in a string array    \return character that is at the first non space, '\0' when end of string    is reached. */char Parse::gotoFirstNonSpace( char** strMsg ){  while(*strMsg && isspace(**strMsg) )    (*strMsg)++;  return  (*strMsg) ?  **strMsg : '\0';}/*! This method walks through the string starting at the character where strMsg    points to and stops when<BR>    - the end of the string is reached<BR>    - a character different than ' ' and ')' is read<BR>    strMsg is changed after this method is called.    \param strMsg pointer to a character in a string array    \return first character that is not equal to ' ' or ')', '\0' when string            didn't contain such a character. */char Parse::gotoFirstSpaceOrClosingBracket( char** strMsg ){  while( *strMsg && **strMsg!=' ' && **strMsg!=')' )    (*strMsg)++;  return  (*strMsg) ?  **strMsg : '\0';}/*! This method walks through the string starting at the character where strMsg    points to and stops when the character c is reached. strMsg is changed    after this method is called..    \param c character that is searched for in strMsg.    \param strMsg pointer to a character in a string array    \return number of character skipped to reach c, -1 when not found */int Parse::gotoFirstOccurenceOf( char c, char** strMsg ){  int i=0;  while(**strMsg && **strMsg != c )  {    i++;    (*strMsg)++;  }  if( ! **strMsg )    return -1;  return i;}/*! This method walks through the string starting at the character where strMsg    points to and returns the first integer that can be read from this string.    Any other characters in front of this integer are discarded. After this    method is returned, strMsg points to the first character after the final    value of the integer.    \param strMsg pointer to a character in a string array    \return first integer that can be read from this string. */int Parse::parseFirstInt( char** strMsg ){  int  iRes  = 0;  bool bIsMin= false;  char *str  = *strMsg;  while( *str != '\0' && !isdigit(*str) && *str!='-')    str++;                             // walk to first non digit or minus sign  if( *str != '\0' && *str=='-')       // if it was a minus sign, remember  {    bIsMin=true;    str++;  }  while( *str != '\0' && *str<='9' && *str>='0' )   // for all digits  {      iRes=iRes*10+(int)(*str-'0');                 // multiply old res with 10      str++;                                        // and add new value  }  *strMsg = str;  return (bIsMin) ? -iRes : iRes;}/*! This method walks through the string starting at the character where strMsg    points to and returns the first double that can be read from this string.    Any other characters in front of this integer are discarded. After this    method is returned, strMsg points to the first character after the final    value of the double. 4e-3, and NaN or nan are also recognized. When input    contains NaN or nan, -1000.0 is returned.    \param strMsg pointer to a character in a string array    \return first double that can be read from this string. */double Parse::parseFirstDouble( char** strMsg ){  double dRes=0.0, dFrac=1.0;  bool bIsMin=false, bInDecimal=false, bCont=true;  char *str = *strMsg;  // go to first part of double (digit, minus sign or '.')  while( *str != '\0' && !isdigit(*str) && *str!='-' && *str!='.')  {    // when NaN or nan is double value, return -1000.0    if( (*str=='N' && strlen(str)>3 && *(str+1)=='a' && *(str+2)=='N') ||        (*str=='n' && strlen(str)>3 && *(str+1)=='a' && *(str+2)=='n') )    {      *strMsg = str+3;      return -1000.0;    }    else       str++;  }  if( *str != '\0' && *str=='-')               // if minus sign, remember that  {    bIsMin=true;    str++;  }  while( *str != '\0' && bCont)                // process the number bit by bit  {    if( *str=='.' )                            // in decimal part after '.'      bInDecimal = true;    else if( bInDecimal && *str<='9' && *str>='0') // number and in decimal    {      dFrac=dFrac*10.0;                        // shift decimal part to right      dRes += (double)(*str-'0')/dFrac;        // and add number    }    else if( *str<='9' && *str>='0' )          // if number and not decimal      dRes=dRes*10+(double)(*str-'0');         // shift left and add number    else if( *str=='e' ) // 10.6e-08           // if to power e    {      if( *(str+1) == '+' )                    // determine sign        dRes *=  pow(10, parseFirstInt(&str)); // and multiply with power      else if( *(str+1) == '-' )      {        str = str+2;                           // skip -        dRes /=  pow(10, parseFirstInt(&str)); // and divide by power      }      bCont = false;                           // after 'e' stop    }    else      bCont = false;                           // all other cases stop    if( bCont == true )                        // update when not stopped yet      str++;  }  *strMsg = str;  return (bIsMin && dRes != 0.0) ? -dRes : dRes;}/******************************************************************************//********************** TESTING PURPOSES *************************************//******************************************************************************//*#include<iostream.h>int main( void ){  double d = 13.6e+15;  char str[] = "13.6e+15";  double d2 = 13.6e-15;  char str2[] = "13.6e-15";  char *strmsg;  strmsg = &str[0];  cout  << d << endl;  cout << Parse::parseFirstDouble( &strmsg )<< endl;  strmsg = &str2[0];  cout  << d2 << endl;  cout << Parse::parseFirstDouble( &strmsg ) << endl;  return 0;}*/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一区二区在线观看| 久久国产精品免费| 99久久99久久综合| 亚洲靠逼com| 欧美精品丝袜中出| 久久99精品网久久| 久久久一区二区三区捆绑**| 波波电影院一区二区三区| 一区二区中文视频| 欧美日韩久久久久久| 久久精品国产亚洲5555| 国产清纯白嫩初高生在线观看91 | 亚洲精品免费电影| 欧美日韩一区二区三区四区五区| 奇米色777欧美一区二区| 欧美精品一区二区三区视频| av电影在线观看不卡| 亚洲国产精品久久久久婷婷884| 91精品国产高清一区二区三区蜜臀| 精品在线视频一区| 成人欧美一区二区三区小说| 91精品婷婷国产综合久久性色| 国产在线视视频有精品| 亚洲欧美一区二区三区久本道91| 91麻豆精品国产| 成人h版在线观看| 天天综合日日夜夜精品| 久久久影院官网| 欧美三级乱人伦电影| 国产麻豆9l精品三级站| 亚洲永久免费av| 久久免费视频一区| 欧美日精品一区视频| 成人激情综合网站| 蜜桃精品视频在线| 亚洲欧美一区二区久久| 精品国产乱码久久久久久夜甘婷婷 | 国产欧美日韩三级| 精品视频1区2区| 丁香桃色午夜亚洲一区二区三区| 亚洲国产一二三| 亚洲欧洲性图库| 亚洲精品一区二区精华| 在线观看av不卡| va亚洲va日韩不卡在线观看| 久久精品国产77777蜜臀| 亚洲一二三区在线观看| 欧美激情在线观看视频免费| 欧美一区二区三区四区视频| 欧美亚洲综合在线| 91小视频在线免费看| 国产精品一区二区三区99| 奇米一区二区三区av| 亚洲国产精品一区二区久久恐怖片 | 久久先锋资源网| 91精品国产欧美一区二区18| 欧美亚洲动漫另类| 99久久99久久综合| 成人一区二区视频| 国产一区二区h| 精品一区二区三区香蕉蜜桃| 日韩电影一区二区三区四区| 亚洲成人精品在线观看| 一区二区三区加勒比av| 综合在线观看色| 中文字幕在线一区二区三区| 中文字幕的久久| 欧美国产成人在线| 国产欧美日韩卡一| 中文字幕成人av| 欧美高清一级片在线观看| 久久久久久久久蜜桃| 久久嫩草精品久久久精品一| 久久综合国产精品| 久久久久久免费毛片精品| 久久久三级国产网站| 国产午夜一区二区三区| 久久久精品影视| 欧美激情在线一区二区| 国产精品蜜臀av| 日韩一区日韩二区| 亚洲乱码一区二区三区在线观看| 亚洲精品视频在线观看网站| 亚洲最新视频在线播放| 性久久久久久久| 青青草国产精品亚洲专区无| 久久99精品视频| 国产91精品久久久久久久网曝门| 成人性视频免费网站| 色中色一区二区| 欧美另类变人与禽xxxxx| 日韩欧美激情在线| 国产日韩欧美高清| 亚洲色图都市小说| 丝袜诱惑制服诱惑色一区在线观看 | 日本一区二区视频在线观看| 国产精品久久夜| 亚洲一区影音先锋| 青青草原综合久久大伊人精品 | 亚洲黄色性网站| 天天亚洲美女在线视频| 国产一区二区福利视频| 9色porny自拍视频一区二区| 欧洲激情一区二区| 日韩视频免费观看高清完整版在线观看| 日韩欧美aaaaaa| 国产精品久久一级| 日韩精品91亚洲二区在线观看 | 精品久久久网站| 中文字幕欧美一区| 日本特黄久久久高潮| 成人精品一区二区三区四区| 精品婷婷伊人一区三区三| 久久久久久日产精品| 一区二区三区四区激情| 毛片基地黄久久久久久天堂| av亚洲精华国产精华精华| 欧美日韩日日摸| 国产精品无遮挡| 日本成人中文字幕| 粉嫩aⅴ一区二区三区四区五区| 色呦呦国产精品| 久久久久高清精品| 日韩国产欧美视频| 91香蕉视频mp4| 久久久久免费观看| 首页国产欧美久久| 99久久婷婷国产精品综合| 欧美一级久久久| 亚洲欧美日韩国产成人精品影院 | 亚洲欧洲成人av每日更新| 久久爱www久久做| 欧美日韩在线直播| 中文字幕av免费专区久久| 美国毛片一区二区| 欧美性三三影院| 亚洲欧美日韩国产综合在线| 国产精品亚洲成人| 日韩一区二区视频在线观看| 一区二区三区在线不卡| 风间由美性色一区二区三区| 日韩美女视频一区二区在线观看| 美女视频黄 久久| 色综合一区二区| 国产精品久久久久久久久久久免费看| 久久精品国产免费看久久精品| 欧美日韩一区二区三区不卡| 亚洲视频一区在线| 国产成人亚洲综合a∨婷婷| 日韩久久精品一区| 蜜臀精品久久久久久蜜臀| 精品污污网站免费看| 一区二区三区 在线观看视频 | 在线观看精品一区| 一区视频在线播放| 99精品视频在线播放观看| 国产无人区一区二区三区| 韩国在线一区二区| 精品福利在线导航| 韩国成人福利片在线播放| 日韩欧美中文字幕制服| 免费亚洲电影在线| 日韩女同互慰一区二区| 麻豆精品国产91久久久久久| 日韩美女主播在线视频一区二区三区| 香蕉乱码成人久久天堂爱免费| 欧美日韩国产美| 午夜精品久久久久久不卡8050| 欧美三日本三级三级在线播放| 亚洲国产cao| 欧美高清www午色夜在线视频| 日本亚洲天堂网| 亚洲精品在线观看网站| 国内精品自线一区二区三区视频| 久久亚洲精品小早川怜子| 国产精品一区二区免费不卡 | 日韩高清欧美激情| 欧美一级高清片在线观看| 久久国产综合精品| 久久婷婷色综合| 99国产精品国产精品毛片| 一区二区三区免费看视频| 欧美人与性动xxxx| 奇米一区二区三区| 久久精品日产第一区二区三区高清版| 国产成人精品亚洲日本在线桃色| 国产精品美女久久久久久久久| 日本精品视频一区二区三区| 五月激情六月综合| 精品乱码亚洲一区二区不卡| 国产suv精品一区二区6| 亚洲精品日韩一| 日韩欧美中文一区| 国产成a人亚洲精| 一区二区三区在线观看网站| 91精品国产美女浴室洗澡无遮挡| 国产精一区二区三区| 亚洲久草在线视频| 欧美一区二区三区四区高清| 国产成人丝袜美腿|