这是什么语言写的?

bingci 2014-07-19 03:32:08
// MSSQLServer 数据库连接
local strServer = "10.0.0.11"; // 报告所在服务器
local strDBName = "opp"; // 数据库
local strUserName = "opp"; // 用户名
local strPwd = "opp"; // 密码
local bShowExcel = true; // 显示Excel?

wc <- CWaitCursor(); // 开始干活. 显示漏沙光标( 表示系统忙ing... )
connDB <- ADOConnection( ); // 创建ADO连接
dsCreateData <- ADODataset();// 创建记录集
dsReport <- ADODataset(); // 创建记录集
local bRet;

{ // 准备
dllKernel32 <- CWin32Dll( "Kernel32.dll" ); // 载入DLL

function WaitExcelFinished( iTimeOut /*超时秒*/ )
{// 函数 等待所有Excel执行结束
local iCounter = iTimeOut;
local iExcelPID = CSYSGlobal.GetPIDByName( "excel.exe" );
while( iExcelPID > 0 )
{
dllKernel32.Sleep( 1000 ); // 等待1000ms

if( iCounter == 0 )
{// 等待太长了. 估计是遇到异常. 直接Kill
CSYSGlobal.KillProcessByPID( iExcelPID );
iExcelPID = CSYSGlobal.GetPIDByName( "excel.exe" ); // 可能还有别的Excel?
iCounter = iTimeOut;
}

iExcelPID = CSYSGlobal.GetPIDByName( "excel.exe" );
iCounter --;
}
}
// end 函数 等待所有Excel执行结束

function ExecSql( connDB, strSql )
{ // 执行SQL
local cmd = ADOSQLCommand( connDB, strSql, adCmdText );
return cmd.Execute();
}
// end 执行SQL

// 连接数据库
bRet = connDB.Open( DB_DRIVER_TYPE_MSSQL, strServer, strDBName, strUserName, strPwd, 30 );
if( !bRet )
{
print( "%s", ADOGetLastErrorText() );
return;
}
}
// end 准备
{// 取出要处理的记录行
{ // 取出要生成数据的报告
dsCreateData.AttachToDB( connDB );
bRet = dsCreateData.Open( format( "select * from t_gtms_report_splitplan where splitStatus = 0" ), openBatch );
if( !bRet )
{
print( "%s", ADOGetLastErrorText() );
}
}
// end 取出要生成数据的报告

{ // 取出要分离的报告
dsReport.AttachToDB( connDB );
bRet = dsReport.Open( format( "select top 10 * from t_gtms_report_uploadInfo where uploadStatus = 1" ), openBatch );
if( !bRet )
{
print( "%s", ADOGetLastErrorText() );
}
}
// end 取出要分离的报告

if( dsCreateData.GetRecordCount( ) <= 0
&& dsReport.GetRecordCount( ) <= 0
)
{// 都没有数据要处理
return;
}
}
// end 取出要处理的记录行
...全文
617 34 打赏 收藏 转发到动态 举报
写回复
用AI写文章
34 条回复
切换为时间正序
请发表友善的回复…
发表回复
threenewbee 2014-07-23
  • 打赏
  • 举报
回复
不是powershell,也不是C C++ Java C# VB Delphi R Python TypeScript Go Ruby Python InstallScript PHP(如果你有听说是以上几种,都可以排除,我都仔细查过了),因该是很罕见的脚本语言。
小污云姐姐 2014-07-23
  • 打赏
  • 举报
回复
看起来好别扭的感觉。
threenewbee 2014-07-23
  • 打赏
  • 举报
回复
http://blog.csdn.net/digitalcastle/article/details/8546475
threenewbee 2014-07-23
  • 打赏
  • 举报
回复
看上去是powershell
  • 打赏
  • 举报
回复
R S T
  • 打赏
  • 举报
回复
S
walkeeper 2014-07-23
  • 打赏
  • 举报
回复
。。从来没见过,跟着大神涨姿势……<-这符号还真是第一次见= =
threenewbee 2014-07-23
  • 打赏
  • 举报
回复
引用 24 楼 findcaiyzh 的回复:
搜CWin32Dll搜到Squirrel Squirrel脚本支持Win32DLL调用。 http://blog.csdn.net/o_yale_o/article/details/5984916
呵呵,涨姿势了~
Conmajia 2014-07-23
  • 打赏
  • 举报
回复
squirrel...标志性的<-...插入赋值符..
云满笔记 2014-07-23
  • 打赏
  • 举报
回复
不是我们所常见的语言 不是C++ C++没有“<-”这个号
宝_爸 2014-07-23
  • 打赏
  • 举报
回复
另一个关于squirrel的讨论 global and local variable declaration http://forum.squirrel-lang.org/default.aspx?g=posts&m=6643 Hi, I would like to discuss about global and local variables declaration in Squirrel language. Actually, we have something like : A <- 10 // global declaration local a = 20 // local declaration The reasons are there but the syntax could still be incomfortable to read. Instead, it could be convenient to write : ::A <- 0, ::B <- 10 // global var declaration (using :: like before) ::A = 0.5, B = 3.14 // global var assignement (both unchanged) a, b <- 20 // local var declaration a = b, b = 10 // local var assignement Advantages (or not) : * Default variable scope is now local. It suits better to a C like language. Since assignement and declaration operators are different, it wont lead to any major problem. We dont have to type local keyword anymore. And majority of variables are local so.. Yea! * <- operator is more consistent both for global and local variables What do you think? Thanks for your time. 应该是squirrel没错了。
宝_爸 2014-07-23
  • 打赏
  • 举报
回复
搜CWin32Dll搜到Squirrel Squirrel脚本支持Win32DLL调用。 http://blog.csdn.net/o_yale_o/article/details/5984916
vnvlyp 2014-07-23
  • 打赏
  • 举报
回复
怎么觉得像ECMAScript的某一变种
Mo_DeNo 2014-07-22
  • 打赏
  • 举报
回复
R语言?计量经济学用的?
於黾 2014-07-22
  • 打赏
  • 举报
回复
记忆中什么语言也没有<-这样的写法啊,应该是->这样才对吧
whatdoyousay 2014-07-22
  • 打赏
  • 举报
回复
可以肯定的是,这绝对不是C#或者VB
bingci 2014-07-20
  • 打赏
  • 举报
回复
不是vc++。。。。。。。。。。。。。。。
IceNature 2014-07-20
  • 打赏
  • 举报
回复
<-这个……是不是反了啊 应该是C吧
bingci 2014-07-20
  • 打赏
  • 举报
回复
还是没有人知道吗?
Couple1 2014-07-19
  • 打赏
  • 举报
回复
是vc++。。。。。
加载更多回复(7)

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧