Вверх ↑
Этот топик читают: Гость
Главный модератор
Ответов: 2997
Рейтинг: 395
#91: 2007-06-26 14:09:40 ЛС | профиль | цитата
Manual PHP5 писал(а):

Пример 20-2. The Built in Exception class

<?php
class Exception
{
protected $message = 'Unknown exception'; // exception message
protected $code = 0; // user defined exception code
protected $file; // source filename of exception
protected $line; // source line of exception

function __construct($message = null, $code = 0);

final function getMessage(); // message of exception
final function getCode(); // code of exception
final function getFile(); // source filename
final function getLine(); // source line
final function getTrace(); // an array of the backtrace()
final function getTraceAsString(); // formated string of trace

/* Overrideable */
function __toString(); // formated string for display
}
?>

карма: 6
Дорогу осилит идущий. Install/Update HiAsm.NET
0
Администрация
Ответов: 15294
Рейтинг: 1518
#92: 2007-06-26 14:18:56 ЛС | профиль | цитата
очевидно, что делать надо отдельный элемент Exception с нижними точками getMessage - getTraceAsString и верхней Object.
карма: 26
0
Главный модератор
Ответов: 2997
Рейтинг: 395
#93: 2007-06-26 22:57:35 ЛС | профиль | цитата
Опять проблемы с компиляцией:
make.bat писал(а):

"make codegen dll for WEB packed"
Borland Delphi Version 12.0 Copyright (c) 1983,98 Inprise Corporation
direct.inc(18)
CodeGen.dpr(953) Hint: Value assigned to 'wop' never used
CodeGen.dpr(1114) Warning: Variable 'cur' might not have been initialized
CodeGen.dpr(2166) Warning: Return value of function 'TCodeBlock.GetLevel' might be undefin
ed
CodeGen.dpr(3338) Warning: Return value of function 'TParser.CountLexem' might be undefine
d
CodeGen.dpr(3442) Hint: Variable 'pe' is declared but never used in 'TParser.LinkedLexem'
CodeGen.dpr(3480) Warning: Comparison always evaluates to True
CodeGen.dpr(3480) Warning: Comparing signed and unsigned types - widened both operands
CodeGen.dpr(3492) Warning: Return value of function 'TParser.IsSetLexem' might be undefine
d
CodeGen.dpr(3509) Warning: Return value of function 'TParser.IsPropLexem' might be undefin
ed
CodeGen.dpr(3522) Warning: Return value of function 'TParser.IsSecLexem' might be undefine
d
CodeGen.dpr(3537) Warning: Return value of function 'TParser.TypeOfLexem' might be undefin
ed
CodeGen.dpr(3548) Warning: Return value of function 'TParser.StrLexem' might be undefined
CodeGen.dpr(3559) Warning: Return value of function 'TParser.CodeLexem' might be undefined

CodeGen.dpr(3580) Warning: Return value of function 'TParser.CallFunc' might be undefined
CodeGen.dpr(3627) Warning: Return value of function 'TParser.CallIntFunc' might be undefin
ed
CodeGen.dpr(3771) Warning: Variable 'args' might not have been initialized
CodeGen.dpr(3692) Warning: Return value of function 'TParser.CallObject' might be undefine
d
CodeGen.dpr(3878) Warning: Variable 'v' might not have been initialized
CodeGen.dpr(3885) Hint: Variable 'r' is declared but never used in 'TParser.Level5'
CodeGen.dpr(3907) Hint: Variable 'r' is declared but never used in 'TParser.Level6'
CodeGen.dpr(3953) Warning: Return value of function 'TParser.Level8' might be undefined
CodeGen.dpr(4021) Warning: Return value of function 'TParser.Level11' might be undefined
CodeGen.dpr(4003) Hint: Variable 'dt' is declared but never used in 'TParser.Level11'
CodeGen.dpr(4409) Error: Undeclared identifier: 'THintParams'
CodeGen.dpr(4415) Error: Missing operator or semicolon
CodeGen.dpr(4416) Error: Missing operator or semicolon
CodeGen.dpr(4417) Error: Missing operator or semicolon
CodeGen.dpr(4424) Error: Incompatible types
CodeGen.dpr(4424) Error: Statement expected, but expression of type 'Integer' found
CodeGen.dpr(4481)
CodeGen.dpr(230) Hint: Private symbol 'isDebug' declared but never used
CodeGen.dpr(242) Hint: Private symbol 'CheckSymbol' declared but never used
Press any key to continue . . .

карма: 6
Дорогу осилит идущий. Install/Update HiAsm.NET
0
Администрация
Ответов: 15294
Рейтинг: 1518
#94: 2007-06-27 08:38:37 ЛС | профиль | цитата
Download New Version
карма: 26
0
Главный модератор
Ответов: 2997
Рейтинг: 395
#95: 2007-06-28 23:29:50 ЛС | профиль | цитата
Dilma писал(а):
для этого придется аргументы по другому задавать


А вот так это выглядит сегодня:
code_1608.txt

[size=-2]------ Добавлено в 23:29
Получаем такой код:

  function db_connect($arg1, $arg2, $arg3) {
if($arg1=="") {
$val10 = "sa";
}
else {
$val10 = $arg1;
}
if($arg2=="") {
$val14 = "12345";
}
else {
$val14 = $arg2;
}
if($arg3=="") {
$val18 = "workflow";
}
else {
$val18 = $arg3;
}
if(!@mysql_connect("proof",$val10,$val14)) {
die(mysql_error());
}
mysql_select_db($val18);
}
А мог бы быть таким:

function db_connect( $user='sa', $password='12345', $db='workflow' ){
mysql_connect( 'proof', $user, $password ) or die( 'I cannot connect to db: ' . mysql_error() );
mysql_select_db( $db ) or die( "Could not select database" );
}
карма: 6
Дорогу осилит идущий. Install/Update HiAsm.NET
0
файлы: 1code_1608.txt [2.7KB] [916]
Администрация
Ответов: 15294
Рейтинг: 1518
#96: 2007-06-28 23:38:30 ЛС | профиль | цитата
Nic писал(а):
А мог бы быть таким:

не мог бы. Писать условия через or у нас ни один элемент не будет
карма: 26
0
Главный модератор
Ответов: 2997
Рейтинг: 395
#97: 2007-06-29 07:29:56 ЛС | профиль | цитата
Как быть с константами? Особенно когда они в аргументах вызова функции:

   $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
карма: 6
Дорогу осилит идущий. Install/Update HiAsm.NET
0
Гость
Ответов: 17029
Рейтинг: 0
#98: 2007-06-29 18:46:14 правка | ЛС | профиль | цитата


Редактировалось 11 раз(а), последний 2021-06-20 10:34:27
карма: 0

0
Администрация
Ответов: 15294
Рейтинг: 1518
#99: 2007-06-29 19:01:16 ЛС | профиль | цитата
FraL писал(а):
А нельзя ли добавить компанент для работы с фтп как в пакете дельфи?

для каких целей?
карма: 26
0
Гость
Ответов: 17029
Рейтинг: 0
#100: 2007-06-29 19:29:28 правка | ЛС | профиль | цитата


Редактировалось 11 раз(а), последний 2021-06-20 10:34:27
карма: 0

0
Администрация
Ответов: 15294
Рейтинг: 1518
#101: 2007-07-01 21:03:02 ЛС | профиль | цитата
FraL, я не думаю, что в данной ситуации уместно отвечать вопросом на вопрос. Появлению компанента это никак не поспособствует
карма: 26
0
Гость
Ответов: 17029
Рейтинг: 0
#102: 2007-07-20 15:50:25 правка | ЛС | профиль | цитата


Редактировалось 11 раз(а), последний 2021-06-20 10:34:27
карма: 0

0
Ответов: 9906
Рейтинг: 351
#103: 2007-07-20 16:10:10 ЛС | профиль | цитата
Ответ ответом на вопрос
карма: 9

0
Администрация
Ответов: 15294
Рейтинг: 1518
#104: 2007-07-20 16:14:53 ЛС | профиль | цитата
если на каждый вопрос отвечать по месяцу, то появление компонента в ближайший год ждать не следует
карма: 26
0
Гость
Ответов: 17029
Рейтинг: 0
#105: 2007-07-20 17:10:13 правка | ЛС | профиль | цитата


Редактировалось 12 раз(а), последний 2021-06-22 15:09:08
карма: 0

0
Сообщение
...
Прикрепленные файлы
(файлы не залиты)